1import 'package:ejdb2_dart/ejdb2_dart.dart'; 2 3void main() async { 4 final db = await EJDB2.open('example.db', truncate: true); 5 6 var id = await db.put('parrots', {'name': 'Bianca', 'age': 4}); 7 print('Bianca record: ${id}'); 8 9 id = await db.put('parrots', {'name': 'Darko', 'age': 8}); 10 print('Darko record: ${id}'); 11 12 final q = db.createQuery('/[age > :age]', 'parrots'); 13 await for (final doc in q.setInt('age', 3).execute()) { 14 print('Found $doc'); 15 } 16 await db.close(); 17} 18