brick_sqlite 0.1.0 copy "brick_sqlite: ^0.1.0" to clipboard
brick_sqlite: ^0.1.0 copied to clipboard

outdated

SQLite connector for Brick, a data persistence library for Flutter

Unreleased #

0.1.0 #

  • Add beforeSave and afterSave hooks to the SqliteAdapter
  • BREAKING CHANGE One-to-many and many-to-many SQLite associations are no longer stored as JSON-encoded strings (i.e. [1, 2, 3] in a varchar column). Join tables are now generated by Brick. To convert existing data, please follow the next steps carefully. If you do not care about existing migration and have not widely distributed your app, simply delete all existing migrations, delete all existing app installs, and run flutter pub run build_runner build in your project root.
    1. Run flutter pub run build_runner build in your project root.
    2. In the created migration file, remove any DropColumn commands from the up statements.
    3. Run this for each DropColumn after super.migrate.
      class MyRepository extends OfflineFirstWithRestRepository {
        @override
        Future<void> migrate() async {
          await super.migrate();
          // TODO update this table with information from the deleted `DropColumn` commands in step 2. 
          final joinsTableColumnMigrations = [
            {
              'localTableName': 'User'
              'columnName': 'hats',
              'foreignTableName': 'Hat',
            },
          ];
          for (var entry in joinsTableColumnMigrations) {
            await sqliteProvider.migrateFromStringToJoinsTable(entry['columnName'], entry['localTableName'], entry['foreignTableName']);
          }
        }
      }
      

0.0.7 #

  • Add StubSqlite.queryValueForColumn to discover the passed argument for a specific column
  • Support OR clauses in StubSqlite. This publicly exposes StubSqlite.queryMatchesResponse.
  • Bump synchronized and sqflite packages to support reentrant locks
  • #52 Support multiplatform with sqlite_ffi
  • BREAKING CHANGE Remove StubSqlite. sqlite_ffi is an in-memory instance of SQLite that can be used in unit test environments. StubSqlite can introduce edge cases not consistent with a real-world SQLite instance.

0.0.6 #

  • Field names should always be used instead of column names in Query#providerArgs:
  • Boolean responses from StubSqlite are converted to 1 and 0. QuerySqlTransformer converts input boolean values in queries to 1 or 0 to ensure they're serialized and compared properly in SQLite; this change ensures the other end performs the same conversion
  • Add test coverage for StubSqlite
  • Fixes an edge case in the QuerySqlTransformer where overlapping field names were replaced multiple times by the fieldsToColumns map, resulting in an improper column names

0.0.5 #

  • Rename Query#params to Query#providerArgs, reflecting the much narrower purpose of the member

0.0.2 #

  • Fix linter hints
9
likes
0
pub points
80%
popularity

Publisher

unverified uploader

SQLite connector for Brick, a data persistence library for Flutter

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

brick_core, brick_sqlite_abstract, logging, meta, path, sqflite, synchronized

More

Packages that depend on brick_sqlite