dbkit 0.4.1
dbkit: ^0.4.1 copied to clipboard
Zero-SQL SQLite toolkit for Dart and Flutter: fluent tables, query builder, relations, migrations and typed codegen.
0.4.1 #
MemoryAdapter.insertsupports TEXT primary keys: string ids (e.g. sync-friendlynewSyncId()values fromdbkit_sync) no longer throw a cast error — the row is stored andinsertreports0(no meaningful integer row id exists; use your caller-supplied id).
0.4.0 #
- Simplified API (breaking): removed exact-duplicate aliases — use
nullable()(notallowNull()),orderBy()/orderByDesc()(notorderByAsc()/latest()/oldest()). - Generated
all()now delegates tolist()instead of carrying a second implementation. - Docs: README rewritten as a step-by-step guide around the single canonical API; examples use canonical methods only.
0.3.1 #
MemoryAdapternow clears stored rows onDROP TABLE, so schema helpers like thedbkit_gen-generateddropXxxTables()behave the same on the fake as on SQLite.- New sibling package
dbkit_gen: annotate model classes and runbuild_runnerto get typed models, table repositories with query helpers, column constants, relationship loaders and link helpers, eager-load wrappers, and schema setup functions.
0.3.0 #
- Text search without
%wildcards:contains/startsWith/endsWith(plusnotContains/notStartsWith/notEndsWith) now escape%,_and\and compile withESCAPE '\', on both backends. New shortcutswhereContains/whereStartsWith/whereEndsWithonTableRefandTableQuery; rawlike/notLike/whereLikestay as the explicit pattern hatch. - Relationships: new
TableRef.load(row, relation)lazy-loads one row's relation (ListforhasMany/ many-to-many,Map?forhasOne/belongsTo);withOne(..., constrain)is now honored forbelongsToinstead of silently ignored.
0.2.0 #
- Production defaults:
Db.open/Db.memorynow enableforeign_keys=ONand a 5sbusy_timeout; file-backed databases also use WAL mode withNORMALsynchronous writes. Orphan foreign keys now fail instead of silently succeeding. - Transactions use
BEGIN IMMEDIATEwithSAVEPOINTsupport, so nested transactions roll back the inner scope only;close()is idempotent. - Atomic
increment/decrement: singleUPDATE col = col + ?on SQL backends via newDbAdapter.updateIncrement(custom adapters implementingDbAdaptermust add this method). - Filtered
TableQuery.count()runs a singleCOUNT(*)instead of fetching all rows (fetch fallback kept for joins/grouping/eager loads). List/Mapvalues are stored as JSON (jsonEncode) instead of DarttoString().- Fail-fast
ArgumentError(works in release builds, unlikeassert) for empty rows/values, negativelimit/offset, invalidpage, and empty table names/identifiers.
0.1.0 #
- Initial release: fluent Table API, query builder, filters, relationships (hasMany/hasOne/belongsTo/manyToMany + eager loading), schema builder, migrations, transactions, sqlite3 + in-memory adapters.