You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am using tortoise.contrib.postgres.fields.ArrayField, my model is as below:
class HelpDoc(BaseModel):
all_path = ArrayField(description="path", null=True)
the all_path field stores like “[1, 2, 3, 10, 20, 25]" and i want to filter records that contains 2, the sql will like below: select * from help_doc where all_path @> ARRAY[2]
I don't find any example from the documentation except raw method。But i don't want to use raw method,i Usually use filter method。
can any one help me , thanks!
The text was updated successfully, but these errors were encountered:
Hi, I am using tortoise.contrib.postgres.fields.ArrayField, my model is as below:
the
all_path
field stores like “[1, 2, 3, 10, 20, 25]" and i want to filter records that contains 2, the sql will like below:select * from help_doc where all_path @> ARRAY[2]
I don't find any example from the documentation except
raw
method。But i don't want to useraw
method,i Usually usefilter
method。can any one help me , thanks!
The text was updated successfully, but these errors were encountered: