Skip to content

Commit

Permalink
Fix index query building on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
tp committed Oct 17, 2024
1 parent 5dae550 commit 7c22865
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions lib/src/query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
}

Expand All @@ -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],
);
}
}
Expand All @@ -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],
);
}
}
Expand All @@ -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],
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 7c22865

Please sign in to comment.