Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/quiet-pandas-filter.md

This file was deleted.

21 changes: 21 additions & 0 deletions packages/drizzle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @softzweig/spindle-drizzle

## 0.3.0

### Minor Changes

- [#26](https://github.com/softzweig/spindle/pull/26) [`c4b7ed7`](https://github.com/softzweig/spindle/commit/c4b7ed7c9f8d36f6d2622562d59d75dabc2a5e0e) Thanks [@vinznt](https://github.com/vinznt)! - Filter values can carry an operator. A value may now be a condition, a small branded object
that builds its own clause from the column the key resolved to, so `ilike`, ranges and
comparisons no longer need a custom repository method.

- The new `filter` module exposes `condition` and helpers that delegate to drizzle's own
operators (`eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `between`, `notBetween`, `like`,
`notLike`, `oneOf`, `noneOf`, `isNotNull`), so the emitted clause is the driver's and no
dialect is reimplemented. `ilike` and `notIlike` are in the same set, marked Postgres
only, matching the flat operator surface drizzle itself exports; SQLite rejects them and
its `like` is already case insensitive for ASCII.
- `where` recognises a condition before the scalar, array and `null` cases, so conditions
work for reads and writes alike, `list`, `count`, `findOne`, `exists`, `patchWhere` and
`deleteWhere` included.
- The default filter value widens to `DrizzleFilterValue` (`SQL | FilterCondition`) in
`AbstractDrizzleRepository` and in both dialect bindings, so `PostgresRepository.of` and
`SqliteRepository.of` accept conditions without extra generics.

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/drizzle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@softzweig/spindle-drizzle",
"version": "0.2.1",
"version": "0.3.0",
"description": "Drizzle ORM repository bindings for Spindle.",
"license": "MIT",
"repository": {
Expand Down
Loading