mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
arraynotcontains filter, closes #1132
This commit is contained in:
parent
8ae0f9f7f0
commit
4c25b035b2
3 changed files with 39 additions and 4 deletions
|
|
@ -154,7 +154,16 @@ class Filters:
|
|||
where j.value = :{p}
|
||||
)""",
|
||||
'{c} contains "{v}"',
|
||||
)
|
||||
),
|
||||
TemplatedFilter(
|
||||
"arraynotcontains",
|
||||
"array does not contain",
|
||||
"""rowid not in (
|
||||
select {t}.rowid from {t}, json_each({t}.{c}) j
|
||||
where j.value = :{p}
|
||||
)""",
|
||||
'{c} does not contain "{v}"',
|
||||
),
|
||||
]
|
||||
if detect_json1()
|
||||
else []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue