Skip to content

Commit

Permalink
server: add astext_ilike sqlafilter (naive JSON columns filtering)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodik committed Nov 6, 2023
1 parent f5e4e85 commit c26979d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ soft-webauthn==0.1.4
soupsieve==2.3.2.post1
SQLAlchemy==1.4.39
sqlalchemy-datatables==2.0.1
sqlalchemy-filters @ git+https://github.com/bodik/sqlalchemy-filters@68f66a88c5fc842daf56f226f6a1d0e60c1381da
sqlalchemy-filters @ git+https://github.com/bodik/sqlalchemy-filters@07b876a8bc27b0a5fc4a495eac63c5924854d871
tenacity==6.3.1
toml==0.10.2
tomli==2.0.1
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ requests
schema
soft-webauthn
sqlalchemy-datatables
git+https://github.com/bodik/sqlalchemy-filters@master-rb3#egg=sqlalchemy-filters
git+https://github.com/bodik/sqlalchemy-filters@master-rb4#egg=sqlalchemy-filters
webtest
5 changes: 4 additions & 1 deletion sner/server/sqlafilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
criteria: COLSPEC OP _value
COLSPEC: /[a-z]+\.[a-z_]+/i
OP: "==" | "!=" | ">=" | "<=" | ">" | "<" | "ilike" | "not_ilike" | "is_null" | "is_not_null" | "in" | "not_in" | "any" | "not_any"
OP: "==" | "!=" | ">=" | "<=" | ">" | "<"
| "ilike" | "not_ilike" | "astext_ilike" | "astext_not_ilike"
| "is_null" | "is_not_null"
| "in" | "not_in" | "any" | "not_any"
_value: _item | array
_item: string | number
Expand Down

0 comments on commit c26979d

Please sign in to comment.