Issue Given this table: class TodoCategories extends Table { IntColumn get age => integer()(); TextColumn get name => text()(); } how can I add an index to the name column? I see from the documentation there is an Index class,
Continue readingTag: flutter-moor
Flutter Drift – parameters prohibited in CHECK constraints
Issue I’m trying to use the drift library (renamed from moor) ,but it’s unable to create tables because of this error: SqliteException(1): parameters prohibited in CHECK constraints, SQL logic error (code 1) CREATE TABLE IF NOT EXISTS enterprise (name TEXT
Continue readingBuild runner not working as expected in flutter drift
Issue flutter packages pub run build_runner build –delete-conflicting-outputs the build runner works perfectly for dao files and generates .g.dart files except for the file containing database class and tables my pupspec.yaml dependencies: flutter: sdk: flutter drift: ^1.6.0 drift_sqflite: ^1.0.0 path_provider:
Continue readingUsing loosely coupled local data repositories in flutter bloc
Issue This is a what is the best practice kind of a question. I am building an app using flutter and I have the below requirements. I have local (installed on the device) and remote (installed on the server) databases.
Continue readingMoor Vs ObjectBox: For Complex Flutter DB
Issue For my next flutter project, Please suggest to me, which will be the best option to implement DB Moor or ObjectBox Thanks in advance Solution It mostly depends on the kind of data you’ll be working with. Since the
Continue readingNo such table error : sqlite (moor) tables created only after clearing app data in Flutter
Issue I am creating a database using Moor for my flutter app. It has 5 tables and corresponding DAOs (Data Access Objects). @UseMoor( tables: [Cart, CartTotal, Books, Subjects, Images], daos: [CartDao, CartTotalDao, BooksDao, SubjectsDao, SearchDao, ImagesDao]) class AppDatabase extends _$AppDatabase
Continue readingHow to debug moor: getting no such table error
Issue I’m inserting data to my database and got the following error… flutter: Moor: Sent INSERT INTO add_cash (name, amount, date, frequency, is_deleted) VALUES (?, ?, ?, ?, ?) with args [income, 100000, 1573102800, once, 0] Does the question marks
Continue readingDuplicating SQLite Rows into same table with one updated field?
Issue So I have a db that contains contacts. Each contact has a folder field that I use to categorize them when displaying in the app, my id is a combo of unique id from server and folder type. What
Continue readingThe argument type 'GeneratedIntColumn' can't be assigned to the parameter type 'int': Moor-Flutter
Issue I am trying to set a foreign key relationship with Moor-Flutter when joining two tables and I get the error below in VS Code; The argument type ‘GeneratedIntColumn’ can’t be assigned to the parameter type ‘int’. At first I
Continue readingSelect data based on month and year
Issue We storing date as String in column created_at by below format 2019-10-09T15:29:28.000+08:00 in Moor. We would like to write a select query, to retrieve data where month are October and year is 2019. Future<ABC> selectReadingBasedOnMonth( int month, int year)
Continue reading