Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Rename filters #148

@kiwicopple

Description

@kiwicopple

Some of the filter names are very short. Names like .sl(), .sr(), .adj() can be hard to remember what to they do. I think it would lead to clearer and more declarative code if the function names were a bit longer.

Current list of filters: https://supabase.io/docs/client/using-filters

Rename suggestions:

  • .cs() -> .contains() or add a json: true option to .in()
  • .cd() -> .within()
  • .sl() -> .rangeLt() or add a range option to .lt(column, value, {range: true})
  • .sr() -> .rangeGt() or add a range option to .gt(column, value, {range: true})
  • .nxl() -> rangeGte() or add a range option to .gte(column, value, {range: true})
  • .nxr() -> rangeLte() or add a range option to .lte(column, value, {range: true})
  • .adj() -> .adjacent()
  • .ova() -> .within()
  • .fts() -> .textSearch(column, search, {type: 'tsvector'})
  • .plfts() -> .textSearch(column, search, {type: 'plainto'})
  • .phfts() -> .textSearch(column, search, {type: 'phraseto'})
  • .wfts() -> .textSearch(column, search, {type: 'websearch'})

Originally posted by @joshnuss in supabase/supabase#534

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions