bloom_db 0.1.5
bloom_db: ^0.1.5 copied to clipboard
Core ORM runtime and annotations for Bloom framework. SQLite and PostgreSQL, QuerySet API modeled on djangors-orm.
Changelog #
0.1.5 - 2026-09-04 #
Fixed #
getOrCreate/updateOrCreaterace (#15): the check-then-insert sequence now runs inside a transaction; if the insert loses a race against a concurrent writer (unique violation), the row is re-fetched and returned withcreated: falseinstead of surfacing the error. Nests cleanly inside caller transactions (savepoints on SQLite).
0.1.4 - 2026-09-04 #
Fixed #
count()ignoreslimit/offset(#10): the count aggregation no longer includes paging, so a queryset withOFFSETbeyond the row count returns the filtered total instead of throwingBloomOrmNotFoundError.- LIKE lookups escape wildcards (#12):
contains/icontains/startsWith/endsWith/iexactescape%,_, and\in user input and emitESCAPE '\', so input matches literally instead of over-matching. - Unfiltered bulk writes refused (#14):
QuerySet.update/deletewithout filters throwBloomOrmInvalidQueryErrorunlessallowUnfiltered: trueis passed, so one call can no longer wipe a table by accident. - Data-layer hardening (#15):
QuerySet.limit/offsetreject negative values; PostgreSQL-onlyregex/iregexlookups fail clearly on SQLite; each executor boundsqueryLogtokMaxQueryLogEntries(1000); nested SQLite transactions use savepoints instead of issuing nestedBEGIN; PostgreSQL TLS setup is documented for production. valuesListhonorsflat(#19):valuesList(db, field, flat: false)(and thevalues_listalias) now returns one{field: value}map per row — the same shape as.values(db, [field])— instead of silently ignoring the parameter and always returning bare values.flat: true(the default) behavior is unchanged.
0.1.3 - 2026-08-31 #
- Maintenance release for the current ORM runtime and transaction API.
0.1.2 - 2026-08-26 #
Added #
DbExecutor.transaction<R>(callback)— atomic multi-statement transactions for bothSqliteDbExecutorandPostgresDbExecutor. Commits on success, rolls back and rethrows the original exception on failure.PostgresDbExecutordelegates topackage:postgres's realConnection.runTx().
0.1.1 - 2026-08-23 #
- Internal query-builder fixes. No public API changes.
0.1.0 #
Initial release.
QuerySet<T>API:filter/exclude/orderBy/limit/offset/get/first/all/exists/count/update/delete/bulkCreate/getOrCreate/updateOrCreate/values/valuesList.Q()filter expressions with&/|/~composition;F()field expressions for atomic updates.@BloomModel/@BloomFieldannotations and manualModelMetadeclaration.PostgresDbExecutorandSqliteDbExecutor, symmetric dialect support.- Parameterized SQL generation throughout — no string-interpolated filter values.