- Add
updatedRows
getter to eventually replacegetUpdatedRows()
method. - Clarify documentation on
lastInsertRowId
andupdatedRows
. - Use
NativeCallable
s for user-defined functions, collations and update streams.
- Add
config
getter toCommonDatabase
to accesssqlite3_db_config
.
- Breaking: The WASM implementation no longer registers a default virtual
file system. Instead,
registerVirtualFileSystem
needs to be used to add desired file system implementations. - Breaking: Fix a typo,
CommmonSqlite3
is now calledCommonSqlite3
. - Breaking: Introduce class modifiers on classes of this package that aren't meant to be extended or implemented by users.
- Add
PreparedStatement.reset()
. - Add the
CustomStatementParameter
class which can be passed as a statement parameter with a customsqlite3_bind_*
call. - Add the
StatementParameters
class andexecuteWith
/selectWith
methods onCommonPreparedStatement
. They can be used to control whether values are bound by index or by name. TheselectMap
andexecuteMap
methods have been deprecated.
- Report correct column names for statements that have been re-compiled due to schema changes.
- Fix user-defined functions returning text not supporting multi-byte utf8 characters.
- Add
WasmSqlite3.loadFromUrl
which uses a streamingfetch()
request to load the sqlite3 WASM binary. - Add
OpfsFileSystem
, a file system implementation for the WASM library that is based on the synchronous File System Access API. - The WASM version of sqlite3 used by this library is now compiled with
-Oz
instead of-Ofast
.
- Fix a regression introduced in 1.10.0 causing crashes when SQL statements containing non-ASCII characters are prepared.
- Rewrite the implementation to allow more code reuse between
dart:ffi
and the WASM-based web implementation.
- Provide more information about the source of sqlite exceptions.
- Fix prepared statements without parameters not being reused properly.
- Include parameters when throwing an exception in prepared statements.
- Change
Row.keys
andRow.values
to return a list.
- Add an API for sqlite3's backup API via
Database.backup()
. - Add an API to load extensions via
sqlite3.ensureExtensionLoaded
.
- Use a
Finalizer
to automatically dispose databases and statements. As finalizers in Dart aren't reliable, you should still make sure to calldispose
manually after you're done with a database or a statement. - Avoid using generative constructors on
@staticInterop
classes.
- Optimizations in the wasm-based file system.
- Fix the
mutex
parameter not doing anything in the FFI-based implementation.
- Allow binding
BigInt
s to statements and functions. They must still be representable as a 64-bit int, but this closes a compatibility gap between the web and the native implementations. - Use ABI-specific integer types internally.
- Add support for application-defined window functions. To register a custom
window function, implement
WindowFunction
and register your function withdatabase.registerAggregateFunction
. - Breaking (For the experimental
package:sqlite3/wasm.dart
library):- The IndexedDB implementation now stores data in 4k blocks instead of full files.
- Removed
IndexedDbFileSystem.load
. UseIndexedDbFileSystem.open
instead. - An
IndexedDbFileSystem
now stores all files, the concept of a persistence root has been removed. To access independent databases, use twoIndexedDbFileSystem
s with a different database name.
- Add
FileSystem.listFiles()
to list all files in a virtual WASM file system.
- Support running
sqlite3/wasm.dart
in web workers.
- Fix
CURRENT_TIMESTAMP
not working with the WebAssembly backend.
- Better support loading sqlite3 on Linux when using
sqlite3_flutter_libs
.
- Very experimental web support, based on compiling sqlite3 to web assembly with a custom file system implementation.
- Fix
checkNoTail
throwing for harmless whitespace or comments following a SQL statement. - Fix a native null-pointer dereference when calling
prepare
with a statement exclusively containing whitespace or comments. - Fix a potential out-of-bounds read when preparing statements.
- Add
prepareMultiple
method to prepare multiple statements from one SQL string. - Add
selectMap
andexecuteMap
onPreparedStatement
to bind SQL parameters by their name instead of their index. - Add support for custom collations with
createCollation
.
- Report writes on the database through the
Database.updates
stream - Internal: Use
ffigen
to generate native bindings
- Fix a crash with common iOS and macOS configurations.
The crash has been introduced in version 1.3.0, which should be avoided.
Please consider adding
sqlite3: ^1.3.1
to your pubspec to avoid getting the broken version
- Add
Cursor.tableNames
andRow.toTableColumnMap()
to obtain tables involved in a result set. Thanks to @juancastillo0!
- Add the
selectCursor
API onPreparedStatement
to step through a result set row by row. - Report the causing SQL statement in exceptions
- Use a new Dart API to determine whether symbols are available
- Attempt opening sqlite3 from
DynamicLibrary.process()
on macOS
- Fix memory leak when preparing statements!
- Don't allow
execute
with arguments when the provided sql string contains more than one argument.
- Add optional parameters to
execute
.
- Don't throw when
PreparedStatement.execute
is used on a statement returning rows.
- Support version
1.0.0
ofpackage:ffi
- Support version
0.3.0
ofpackage:ffi
- Migrate library to support breaking ffi changes in Dart 2.13:
- Use
Opaque
instead of empty structs - Use
Allocator
api
- Use
- Fix loading sqlite3 on iOS
- Migrate package to null safety
- Added the
mutex
parameter to control the serialization mode when opening databases.
- Expose the
sqlite3_temp_directory
global variable
- Expose underlying database and statement handles
- Support opening databases from uris
- Use
sqlite3_version
to determine ifsqlite3_prepare_v3
is available instead of catching an error.
- Use
sqlite3_prepare_v2
ifsqlite3_prepare_v3
is not available
- Lower minimum version requirement on
collection
to^1.14.0
- Enable extended result codes
- Expose raw rows from a
ResultSet
- Expose the
ResultSet
class
- Initial version