Skip to content

v0.13.0

Choose a tag to compare

@benvinegar benvinegar released this 07 Jul 20:17
· 14 commits to main since this release
87dc6da

Breaking changes

  • This pre-1.0 minor release intentionally removes defineScopedTable(...) and ScopedTableRule from the public entrypoint. Prefer declarative scopeByColumn(...) / scopeByPredicate(...) rules, or use an explicit unsafe escape for bespoke query paths.
  • Remove the legacy hasScopeInConflictTarget custom-rule hook. Scoped PostgreSQL/SQLite upserts now derive their conflict-update guard from the rule's injected where(scopeValue) predicate and attach it to setWhere.

Added

  • Extend scopeByColumn(...) to accept composite column scopes, deriving guard predicate injection, insert/update validation, strict SQL validation, and RQBv2 object filters from one declaration.
  • Add scopeByPredicate(...) for one or more non-equality predicates such as soft deletes, with strict SQL validation derived from declared columns.

Changed

  • Simplify the README API docs by moving advanced wrapper options out of the primary path.
  • Throw a clear error when a scopeByColumn(...) column map's default resolver receives a primitive scope value, instead of silently resolving to undefined and producing always-empty guards. Use the single-column form for primitive scopes or supply an explicit value resolver.