Skip to content

[Feature Request] Portable mode: "insensitive" on string comparison (postgresql and sqlite) #2635

@jaenyf

Description

@jaenyf

Is your feature request related to a problem? Please describe.
As of zenstack 3.6.4 using
mode: "insensitive" for string search is supported with postgresql dialect but not with sqlite dialect (it throws at validation).
IMHO, orm should offer an abstraction for this, or propose to enable one.
I use postgresql for production and sqlite for tests and I want to avoid writing code to test which underlying DB is in use. I think ORM should abstract this for the dev.

Describe the solution you'd like
Possible solutions :

  • perform lowercase string comparison on sqlite to achieve the same effect by default
  • add a config option to enable lowercase string comparison on sqlite if not enabled by default
  • just ignore it, or propose a config option to silently ignore it on sqlite, aka. ignore validation

Describe alternatives you've considered
IDK

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions