Skip to content

feat:Add final DSL support so no rawsql needed for docs - #17

Merged
ankitml merged 1 commit into
mainfrom
ankitml/all-doc-snippets-dsl-support
Mar 4, 2026
Merged

feat:Add final DSL support so no rawsql needed for docs#17
ankitml merged 1 commit into
mainfrom
ankitml/all-doc-snippets-dsl-support

Conversation

@ankitml

@ankitml ankitml commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Ticket(s) Closed

Expands SQLAlchemy query DSL coverage so docs/examples no longer need raw SQL fallbacks for key search cases.

  • Adds tokenizer-cast support (tokenizer=) to search.match_all, search.match_any, search.term, and search.phrase.
  • Adds constant scoring support (const=) to match_all, match_any, term, phrase, and regex; adds boost= support to regex.
  • Adds search.exists(field) helper for idiomatic field @@@ pdb.exists().
  • Extends search.range_term() to support scalar point queries (e.g. range_term(field, 1)) in addition to existing range-literal mode.
  • Extends search.phrase() to support pretokenized token arrays (Sequence[str]) with optional slop.
  • Fixes array+slop runtime casting edge case by coercing token arrays to TEXT[] before ::pdb.slop(...) (avoids psycopg VARCHAR[] cast failure).

What

Why

How

Tests

@ankitml ankitml changed the title Add final DSL support so no rawsql needed for docs feat:Add final DSL support so no rawsql needed for docs Mar 4, 2026
@ankitml
ankitml merged commit c46ce01 into main Mar 4, 2026
8 of 10 checks passed
@ankitml
ankitml deleted the ankitml/all-doc-snippets-dsl-support branch March 4, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant