diff --git a/CHANGELOG.md b/CHANGELOG.md index 18692fb..59f5573 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 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_libs` on Android diff --git a/lib/src/query.dart b/lib/src/query.dart index 9d9526b..20c0754 100644 --- a/lib/src/query.dart +++ b/lib/src/query.dart @@ -55,8 +55,8 @@ class _EqualQuery extends Query { (String, List) _entityKeysQuery() { if (this.value == null) { return ( - 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = "$field" AND `value` IS NULL', - [entity], + 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = ? AND `value` IS NULL', + [entity, field], ); } @@ -65,8 +65,8 @@ class _EqualQuery extends Query { : this.value; return ( - 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = "$field" AND `value` = ?', - [entity, value], + 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = ? AND `value` = ?', + [entity, field, value], ); } } @@ -91,8 +91,8 @@ class _GreaterThanQuery extends Query { : this.value; return ( - 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = "$field" AND `value` > ?', - [entity, value], + 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = ? AND `value` > ?', + [entity, field, value], ); } } @@ -117,8 +117,8 @@ class _LessThanQuery extends Query { : this.value; return ( - 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = "$field" AND `value` < ?', - [entity, value], + 'SELECT `entity` FROM `index` WHERE `type` = ? AND `field` = ? AND `value` < ?', + [entity, field, value], ); } } diff --git a/pubspec.yaml b/pubspec.yaml index 39a0ac8..1d6a864 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: indexed_entity_store description: A fast, simple, and synchronous entity store for Flutter applications. -version: 1.2.1 +version: 1.2.2 repository: https://github.com/LunaONE/indexed_entity_store environment: