Skip to main content

idb_sqflite 1.5.1 copy "idb_sqflite: ^1.5.1" to clipboard
idb_sqflite: ^1.5.1 copied to clipboard

IndexedDB API on top of sqflite for Flutter (Desktop and Mobile) and DartVM io applications

1.5.1 #

  • clear() also deletes the index rows of the store (they were left, then matched to the records reusing their row id). A database cleared by an older version keeps those rows; deleting and recreating the index in an upgrade removes them.
  • add() of an existing key fails with a ConstraintError on a store with an array keyPath.
  • On an autoIncrement store, string keys never match the number keys in getObject, getKey, count, delete, getAll, cursors and key ranges (sqlite converted '1' to 1). Its keys are still integers only: a put or add with a text number key such as '2' stores the number 2, other keys fail.
  • An index cursor update no longer skips the next entry of the record (in a multiEntry index), and update/delete handle the other entries of a record with an array primary key.
  • A failed cursor query ends the cursor stream with its error (it never completed).
  • Array keys are only supported as the items of an array keyPath: an array key or key range bound for a store or an index without one fails with a DataError (it gave wrong results or bad sql). A List<int> index value is still stored as a binary.
  • Key range bounds of another length than an array keyPath, or a single key bound, follow the IndexedDB key order (they failed).
  • A Uint8List key is a binary key, not an array.
  • Cursor update and delete in a readonly transaction fail with a ReadOnlyError; cursor update of a value whose in-line key is another key fails with a DataError.
  • getAll/getAllKeys with a count of 0 return every record, like IndexedDB.
  • A map with a single key starting with @ has its values converted too (a DateTime in it failed).

1.5.0 #

  • Requests of a transaction run one at a time, in the order they are made, like IndexedDB: a cursor opened right after an unawaited put sees the record and its index keys (a put of a new key could run its insert after the cursor query).
  • Records sharing an index key are ordered by primary key (in the direction of the query), like IndexedDB: index cursors, getAll, getAllKeys, get, getKey, sdb paged queries and native joins (they used to follow the insertion order).
  • Index.get and Index.getKey accept a KeyRange.
  • Index.getKey returns the whole primary key of a store with an array keyPath (it returned its first item only).
  • delete() on a key cursor (openKeyCursor) fails, like IndexedDB and the memory implementation.

1.4.6 #

  • Implement IdbJoinQuerySupport on stores and indexes, resolving an sdb join natively as a single sql LEFT JOIN/INNER JOIN (per chunk) instead of one query per distinct join key. The join key is read from an index when the join key path is indexed, from the stored value (json_extract) otherwise, or from the record/index key itself when there is no join key path; the joined side is the target store or the view of its index.
  • Create an index on the record id column of every index table (backfilled on first open of an older database), used to find a record's index rows without scanning the index table, and by a native join to reach the index key of a record from an index-sourced join key.
  • Depends on idb_shim 2.9.10-1+

1.4.5 #

  • Add idb-sqflite-setup agent skill in skills/, installable with dart run skills@ get
  • Apply the offset and the limit of an sdb query in sql (LIMIT/OFFSET) instead of reading the whole table through a cursor, for findRecords, findRecordKeys, streamRecords, iterate and delete on stores and indexes.
  • Depends on idb_shim 2.9.8-1+

1.4.4 #

  • Support sandbox
  • Remove support for getDatabaseNames()

1.4.3 #

  • Override getDatabaseFullPath()

1.4.2 #

  • require dart 3.12

1.4.1+1 #

  • Depends on idb_shim 2.9.1+
  • idb: Remove invalid warning when deleting an object that does not exist

1.4.0 #

  • fix cursor stack overflow issue.

1.3.6+3 #

  • require dart 3.10

1.3.5 #

  • Fix Sdb.delete with boundaries, limit, offset and descending.

1.3.4 #

  • Requires dart 3.7

1.3.3+7 #

  • sdb (Simple db) support.
  • add idbFactorySqflite (using default sqflite factory)
  • Check whether a database exists before adding it to the global store database

1.3.2+1 #

  • cursor utils support

1.3.1 #

  • Dart 3 support

1.3.0 #

  • Support strict-casts mode

1.2.0+1 #

  • Add support for store composite keyPath.

1.1.1 #

  • Fix #11, stack overflow when dealing with large dataset

1.1.0 #

  • Requires dart sdk 2.15

1.0.1 #

  • dart 2.14 lints

1.0.0 #

  • nnbd support, breaking change

0.3.2+2 #

  • Add support for Transaction.abort

0.3.1+1 #

  • Supports ObjectStore.getAll/getAllKeys and Index.getAll/getAllKeys
  • Bump idb_shim dependency to 1.12.1+1

0.3.0+1 #

  • No longer depends on flutter, sqflite must be explicitly added as a dependency.
  • Add support for DateTime and Uint8List

0.2.0 #

  • deprecate idbFactorySqflite to allow non-flutter support in the future

0.1.0+6 #

  • Initial revision
46
likes
160
points
3.67k
downloads

Documentation

API reference

Publisher

verified publishertekartik.com

Weekly Downloads

IndexedDB API on top of sqflite for Flutter (Desktop and Mobile) and DartVM io applications

Repository (GitHub)
View/report issues

Topics

#database

License

BSD-2-Clause (license)

Dependencies

idb_shim, meta, path, sqflite_common, synchronized

More

Packages that depend on idb_sqflite