Created
April 8, 2020 09:07
-
-
Save simolus3/47cbdf7e46ec8e68293c0a2cdd8533c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:moor_ffi/database.dart'; | |
void main() { | |
final db = Database.memory(); | |
db.execute(''' | |
CREATE TABLE ravs( | |
id INTEGER NOT NULL PRIMARY KEY, | |
originalId INTEGER NOT NULL, | |
sourceId INTEGER NOT NULL, | |
totalCount INTEGER NOT NULL, | |
rav TEXT NOT NULL | |
); | |
'''); | |
db.execute("INSERT INTO ravs VALUES(1,1,1,1, 'הרב נתנאל אלישיב');"); | |
final stmt = db.prepare('SELECT * FROM ravs WHERE rav LIKE ?'); | |
for (final row in stmt.select(['%הרב %'])) { | |
print(row); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment