12 KiB
zombiezen.com/go/sqlite
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.13.1 - 2023-08-15
Version 0.13.1 fixed a bug with the sqlitemigration
package.
Fixed
sqlitemigration
will no longer disable foreign keys during operation (#54).
0.13.0 - 2023-03-28
Version 0.13 added support for user-defined collating sequences and user-defined virtual tables.
Added
- Support user-defined collating sequences (#21).
- Support user-defined virtual tables (#15).
- New package
ext/generateseries
provides an optionalgenerate_series
table-valued function extension. - Exported the
regexp
function example as a newext/refunc
package. - Add
*Conn.Serialize
and*Conn.Deserialize
methods (#52).
Changed
- The minimum supported Go version for this library is now Go 1.19.
Fixed
- The documentation for
AggregateFunction.WindowValue
incorrectly stated that it would not be called in non-window contexts. The sentence has been removed, but the behavior has not changed.
0.12.0 - 2023-02-08
Version 0.12 added support for the online backup API.
Added
- Added support for the online backup API (#47).
- Documented the
OpenFlags
.
Changed
OpenNoMutex
andOpenFullMutex
no longer have an effect onsqlite.OpenConn
.OpenNoMutex
(i.e. multi-thread mode) is now the only supported mode.*sqlite.Conn
has never been safe to use concurrently from multiple goroutines, so this is mostly to prevent unnecessary locking and to avoid confusion. (#32).
0.11.0 - 2022-12-11
Version 0.11 changes the aggregate function API.
Changed
- User-defined aggregate functions are now encapsulated
with a new interface,
AggregateFunction
. The previous 4-callback approach has been removed and replaced with a singleMakeAggregate
callback. Not only was the previous API unwieldy, but it failed to handle concurrent aggregate function calls in a single query. - Minimum
modernc.org/sqlite
version updated to 1.20.0.
0.10.1 - 2022-07-17
Version 0.10.1 fixes a bug in user-defined window functions. Special thanks to Jan Mercl for assistance in debugging this issue.
Fixed
AggregateFinal
is now called correctly at the end of window functions' usages.
0.10.0 - 2022-07-10
Version 0.10 adds support for user-defined window functions.
Added
FunctionImpl
has two new fields (WindowValue
andWindowInverse
) that allow creating user-defined aggregate window functions (#42).
Changed
- The
AggregateStep
callback now returns anerror
.
0.9.3 - 2022-05-30
Version 0.9.3 updates the version of modernc.org/sqlite
used.
Changed
- Minimum
modernc.org/sqlite
version updated to v1.17.3.
0.9.2 - 2022-01-25
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.
Added
- Added
SetBlockOnBusy
method to set an indefinite timeout on acquiring a lock. - Official support for
windows/amd64
. sqlitex
has three new functions —Execute
,ExecuteTransient
, andExecuteScript
— that take in anExecOptions
struct. (#5)- New method
sqlite.ResultCode.ToError
to create error values. - New methods
ColumnBool
andGetBool
on*sqlite.Stmt
(#37).
Changed
OpenConn
callsSetBlockOnBusy
on new connections instead ofSetBusyTimeout(10 * time.Second)
.- The
sqlitex.Execute*
family of functions now verify that the arguments passed match the SQL parameters. (#31)
Deprecated
sqlitex.ExecFS
has been renamed tosqlitex.ExecuteFS
,sqlitex.ExecTransientFS
has been renamed tosqlitex.ExecuteTransientFS
, andsqlitex.ExecScriptFS
has been renamed tosqlitex.ExecuteScriptFS
for consistency with the newExecute
functions. Aliases remain in this version, but will be removed in the next version. Usezombiezen-sqlite-migrate
to clean up existing references.sqlitex.Exec
andsqlitex.ExecTransient
have been marked deprecated because they do not perform the argument checks that theExecute
functions now perform. These functions will remain into 1.0 and beyond for compatibility, but should not be used in new applications.
Fixed
sqlitemigration.Schema.RepeatableMigration
is now run as part of the final transaction. This ensures that the repeatable migration for migrationN
has executed if and only ifuser_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!).
0.9.0 and 0.9.1
Versions 0.9.0 was accidentally released before CI ran.
A change in the underlying modernc.org/libc
library
caused the memory leak detection to identify a false positive.
In an abundance of caution, 0.9.1 was released
to mark both 0.9.1 and 0.9.0 as retracted.
Version 0.9.2 is the first official release of 0.9.
0.8.0 - 2021-11-07
Version 0.8 adds new transaction functions to sqlitex
.
Added
- Added
sqlitex.Transaction
,sqlitex.ImmediateTransaction
, andsqlitex.ExclusiveTransaction
.
0.7.2 - 2021-09-11
Fixed
- Updated
modernc.org/sqlite
dependency to a released version instead of a prerelease
0.7.1 - 2021-09-09
Added
- Added an example to
sqlitemigration.Schema
0.7.0 - 2021-08-27
Added
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)
Changed
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.
Fixed
- Fixed compile breakage on 32-bit architectures. Thanks to Jan Mercl for the report.
0.6.2 - 2021-08-17
Changed
*sqlitex.Pool.Put
now acceptsnil
instead of panicing. (#17)
0.6.1 - 2021-08-16
Fixed
- Fixed a potential memory corruption issue introduced in 0.6.0. Thanks to Jan Mercl for the report.
0.6.0 - 2021-08-15
Added
- Added back the session API:
Session
,ChangesetIterator
,Changegroup
, and various functions. There are some slight naming changes from thecrawshaw.io/sqlite
API, but they can all be migrated automatically with the migration tool. (#16)
Changed
- Method calls to a
nil
*sqlite.Conn
will return an error rather than panic. (#17)
Removed
- Removed
OpenFlags
that are only used for VFS.
Fixed
- Properly clean up WAL when using
sqlitex.Pool
(#14) - Disabled double-quoted string literals.
0.5.0 - 2021-05-22
Added
- Added
shell
package with basic REPL - Added
SetAuthorizer
,Limit
, andSetDefensive
methods to*Conn
for use in (#12) - Added
Version
andVersionNumber
constants
Fixed
- Documented compiled-in extensions (#11)
- Internal objects are no longer susceptible to ID wraparound issues (#13)
0.4.0 - 2021-05-13
Added
0.3.1 - 2021-05-03
Fixed
- Fix conversion of BLOB to TEXT when returning BLOB from a user-defined function
0.3.0 - 2021-04-27
Added
- Implement
io.StringWriter
,io.ReaderFrom
, andio.WriterTo
onBlob
(#2) - Add godoc examples for
Blob
,sqlitemigration
, andSetInterrupt
- Add more README documentation
0.2.2 - 2021-04-24
Changed
- Simplified license to ISC
Fixed
- Updated version of
modernc.org/sqlite
to 1.10.4 to use mutex initialization - Fixed doc comment for
BindZeroBlob
0.2.1 - 2021-04-17
Fixed
- Removed bogus import comment
0.2.0 - 2021-04-03
Added
- New migration tool. See the README to get started. (#1)
Changed
*Conn.CreateFunction
has changed entirely. See the reference for details.sqlitex.File
andsqlitex.Buffer
have been moved to thesqlitefile
package- The
sqlitefile.Exec*
functions have been moved to thesqlitex
package asExec*FS
.
0.1.0 - 2021-03-31
Initial release