Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
example/ | 12-May-2024 | - | 57 | 46 | ||
lib/ | 12-May-2024 | - | 6,277 | 2,678 | ||
test/ | 12-May-2024 | - | 193 | 155 | ||
.gitignore | D | 12-May-2024 | 11 | 1 | 1 | |
.packages | D | 12-May-2024 | 4.7 KiB | 55 | 54 | |
CHANGELOG.md | D | 12-May-2024 | 167 | 4 | 3 | |
CMakeLists.txt | D | 12-May-2024 | 3.3 KiB | 92 | 75 | |
LICENSE | D | 12-May-2024 | 1.1 KiB | 21 | 17 | |
README.md | D | 12-May-2024 | 1.2 KiB | 50 | 34 | |
analysis_options.yaml | D | 12-May-2024 | 4.9 KiB | 158 | 126 | |
pubspec.yaml | D | 12-May-2024 | 432 | 16 | 13 | |
pubspec.yaml.in | D | 12-May-2024 | 446 | 16 | 13 | |
version.txt | D | 12-May-2024 | 14 | 1 | 1 |
README.md
1# EJDB2 Dart VM native binding 2 3Embeddable JSON Database engine http://ejdb.org Dart binding. 4 5See https://github.com/Softmotions/ejdb/blob/master/README.md 6 7For API usage examples take a look into [/example](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_dart/example) and [/test](https://github.com/Softmotions/ejdb/tree/master/src/bindings/ejdb2_dart/test) folders. 8 9## Example 10 11```dart 12import 'package:ejdb2_dart/ejdb2_dart.dart'; 13 14void main() async { 15 final db = await EJDB2.open('example.db', truncate: true); 16 17 var id = await db.put('parrots', {'name': 'Bianca', 'age': 4}); 18 print('Bianca record: ${id}'); 19 20 id = await db.put('parrots', {'name': 'Darko', 'age': 8}); 21 print('Darko record: ${id}'); 22 23 final q = db.createQuery('/[age > :age]', 'parrots'); 24 await for (final doc in q.setInt('age', 3).execute()) { 25 print('Found ${doc}'); 26 } 27 await db.close(); 28} 29``` 30 31## Supported platforms 32 33* Linux x64 34* OSX 35 36## How build it manually 37 38Note: native binding requires Dart SDK version >= 2.12.x 39 40``` sh 41git clone https://github.com/Softmotions/ejdb.git 42cd ./ejdb 43mkdir ./build && cd build 44cmake .. -DBUILD_DART_BINDING=ON -DCMAKE_BUILD_TYPE=Release 45make 46cd src/bindings/ejdb2_dart/ejdb2_dart 47pub get 48``` 49 50