Low-level Go interface to SQLite 3
Version 0.10 adds support for user-defined window functions.
FunctionImpl
has two new fields (WindowValue
and WindowInverse
) that allow creating user-defined aggregate window functions (#42).AggregateStep
callback now returns an error
.Version 0.9 adds new Execute
functions to sqlitex
and changes the default blocking behavior. Version 0.9 also includes various fixes to the schema migration behavior.
SetBlockOnBusy
method to set an indefinite timeout on acquiring a lock.windows/amd64
.sqlitex
has three new functions — Execute
, ExecuteTransient
, and ExecuteScript
— that take in an ExecOptions
struct. (#5)sqlite.ResultCode.ToError
to create error values.ColumnBool
and GetBool
on *sqlite.Stmt
(#37).OpenConn
calls SetBlockOnBusy
on new connections instead of SetBusyTimeout(10 * time.Second)
.sqlitex.Execute*
family of functions now verify that the arguments passed match the SQL parameters. (#31)sqlitex.ExecFS
has been renamed to sqlitex.ExecuteFS
, sqlitex.ExecTransientFS
has been renamed to sqlitex.ExecuteTransientFS
, and sqlitex.ExecScriptFS
has been renamed to sqlitex.ExecuteScriptFS
for consistency with the new Execute
functions. Aliases remain in this version, but will be removed in the next version. Use zombiezen-sqlite-migrate
to clean up existing references.sqlitex.Exec
and sqlitex.ExecTransient
have been marked deprecated because they do not perform the argument checks that the Execute
functions now perform. These functions will remain into 1.0 and beyond for compatibility, but should not be used in new applications.sqlitemigration.Schema.RepeatableMigration
is now run as part of the final transaction. This ensures that the repeatable migration for migration N
has executed if and only if user_version == N
. Previously, the repeatable migration could fail independently of the final transaction, which would mean that a subsequent migration run would not trigger a retry of the repeatable transaction, but report success.sqlitemigration
will no longer skip applying the repeatable migration if the final migration is empty.OpenConn
now sets a busy handler before enabling WAL (thanks @anacrolix!).Beta release of 0.9 (release notes). This release contains some changes that I want to experiment with in a few of my projects before finalizing the release, so I'm cutting a beta tag first.
sqlitemigration.Schema
has a new option for disabling foreign keys for individual migrations. This makes it easier to perform migrations that require reconstructing a table. (#20)sqlitemigration.Migrate
and *sqlitemigration.Pool
no longer use a transaction to apply the entire set of migrations: they now only use transactions during each individual migration. This was never documented, so in theory no one should be depending on this behavior. However, this does mean that two processes trying to open and migrate a database concurrently may race to apply migrations, whereas before only one process would acquire the write lock and migrate.