MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / postgres_search

Function postgres_search

tortoise/backends/base_postgres/executor.py:48–52  ·  view source on GitHub ↗
(
    field: Term, value: Term | str, field_is_vector: bool = False
)

Source from the content-addressed store, hash-verified

46
47
48def postgres_search(
49 field: Term, value: Term | str, field_is_vector: bool = False
50) -> SearchCriterion:
51 query = value if isinstance(value, Term) else PlainToTsQuery(ValueWrapper(value))
52 return SearchCriterion(field, expr=query, vectorize=not field_is_vector)
53
54
55class BasePostgresExecutor(BaseExecutor):

Callers

nothing calls this directly

Calls 2

PlainToTsQueryClass · 0.90
SearchCriterionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…