indexed_entity_store 2.0.2
indexed_entity_store: ^2.0.2 copied to clipboard
A fast, simple, and synchronous entity store for Flutter applications.
2.0.2 #
- Use explicit precedence, fixing a potential issue when using 3 or more filters
2.0.1 #
- Add tests for internal schema migrations
- Add
delete(where: )to delete all rows matching a specific index-query
2.0.0 #
- Update method names
- Most notably
insertis nowwriteto transmit the ambivalence between "insert" and "update" getis nowreadto be symmetric to write (but instead of entities it takes keys, of course)querynow takes an optionalwhereparameter, so instead ofgetAll()you can now just usequery()to get the same resultdeletenow bundles multiple ways to identify entities to delete, offering a simpler API surface for the overall store
- Most notably
- Support foreign key (
referencing) anduniqueconstraints on indices- With
referencingone can ensure that the index's value points to an entityt with the same primary key in another store - A
uniqueindex ensures that only one entity in the store uses the same value for that key
- With
1.4.7 #
- Add
containsfunctions forStringindex columns
1.4.6 #
- Re-enable foreign key constraint for every session
- Clean up unused indices which were not automatically removed before (but will be going forward)
1.4.5 #
- try/catch with
ROLLBACKin case a transaction fails, so as to not leave the database in a locked state - Re-add explicit deletion of index, as
REPLACE INTOwas observed to not remove the entity's index on all platforms (and there is no clear documentation under what circumstances it would do or not do so)
1.4.4 #
- Add another example, showing how to build repositories with a
Future<ValueListenable<T>>interface - Fix index migration bug (introduced in 1.4.3), when a name is reused across index versions
1.4.3 #
- Add
insertManymethod to handle batch inserts/updates- This, combined with a new index, massively speeds up large inserts:
- Inserting 1000 entities with 2 indices is now 40x faster than a simple loop using
inserts individually - When updating 1000 existing entities with new values, the new implementation leads to an even greater 111x speed-up
- Inserting 1000 entities with 2 indices is now 40x faster than a simple loop using
- This further proves that the synchronous database approach can handle even large local databases and operations. If you need to insert even larger amounts of data without dropping a frame, there is a solution for that as well.
- This, combined with a new index, massively speeds up large inserts:
1.4.2 #
- Add full example app
- Implement
DisposableValueListenableforQueryResult
1.4.1 #
- Add
deleteAllmethod
1.4.0 #
- Enhance subscriptions to not emit updates when the underlying database value has not changed
- E.g. when an object is updated with the exact same storage values or a query ends up with the same result list no updates are emitted
- Fix unsubscribe for queries
1.3.0 #
- Add
single/singleOncefor cases where one expects a single match, but does not have a primary key - Add
limitandorderBytoquery/queryOnce - Add
orderBytogetAll/getAllOnce
1.2.2 #
- Fix index query building on Android / latest
sqlite3_flutter_libs
1.2.1 #
- Fix DB init with the latest SQLite from
sqlite3_flutter_libson Android
1.2.0 #
- Typed indices: All queries not check the parameter types, such that one does not accidentally pass a
Stringto anintindex field for example.- These are checked at runtime, as the interface does not allow specifying the type signature per column
- Additional the index-building specification has been changed, to be able to discern field which are nullable and those which must not be
- Add more query methods: less than (or equal) and greater than (or equal)
1.1.1 #
- Add
deleteEntityin case the caller does not have access to the primary key used by the connector (e.g. if it's a combined one)
1.1.0 #
- Adds reactivity
- Callers now get notified for every update to their queries
- All queries are now reactive by default, so queries can be composed without missing any updates. This is highly useful unless the synchronizations happens on a higher application layer, in which case the
*Oncemethods can be used.
1.0.0 #
- Initial release.