mirror of
https://github.com/openfoodfacts/smooth-app.git
synced 2025-08-06 18:25:11 +08:00

New files: * `abstract_sql_dao.dart`: DAO abstraction for SQL. * `bulk_deletable.dart`: Interface for bulk database deletes. * `bulk_insertable.dart`: Interface for bulk database inserts. * `bulk_manager.dart`: Manager for bulk database inserts and deletes. * `dao_hive_product.dart`: moved code from the previous `hive` version of `DaoProduct`, renamed here `DaoHiveProduct` Impacted files: * `dao_product.dart`: `sqflite` version of `DaoProduct`, that is from now on the only one to be used * `local_database.dart`: added `sqflite` and its one table so far, also named `DaoProduct` in order to minimize the changes everywhere else (the old `DaoProduct` being renamed `DaoHiveProduct`); migrated the product data from `hive` to `sqflite` * `Podfile.lock`: wtf * `pubspec.lock`: wtf * `data_importer/pubspec.yaml`: updated the `sqflite` dependency to the same as in `smooth_app` * `smooth_app/pubspec.yaml`: added a dependency to `sqflite`
13 lines
271 B
Dart
13 lines
271 B
Dart
import 'package:smooth_app/database/bulk_manager.dart';
|
|
|
|
/// Interface for bulk database inserts.
|
|
///
|
|
/// cf. [BulkManager]
|
|
abstract class BulkInsertable {
|
|
/// Insert columns for bulk mode
|
|
List<String> getInsertColumns();
|
|
|
|
/// Table name
|
|
String getTableName();
|
|
}
|