Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/24.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Refactored SQL function generation utilities by migrating them from types/ to functions/ directory for better module responsibility separation.
2 changes: 2 additions & 0 deletions src/rhosocial/activerecord/backend/impl/postgres/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
from .types.text_search import (
PostgresTsVector,
PostgresTsQuery,
)
from .functions.text_search import (
to_tsvector,
to_tsquery,
plainto_tsquery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
- enum: Enum functions - https://www.postgresql.org/docs/current/functions-enum.html
- bit_string: Bit string functions and operators - https://www.postgresql.org/docs/current/functions-bitstring.html
- json: JSON functions and operators - https://www.postgresql.org/docs/current/functions-json.html
- text_search: Full-text search functions - https://www.postgresql.org/docs/current/functions-textsearch.html
- xml: XML functions - https://www.postgresql.org/docs/current/functions-xml.html
"""

# Range functions
Expand Down Expand Up @@ -102,6 +104,32 @@
jsonb_path_match,
)

# Text search functions
from .text_search import (
to_tsvector,
to_tsquery,
plainto_tsquery,
phraseto_tsquery,
websearch_to_tsquery,
ts_matches,
ts_matches_expr,
ts_rank,
ts_rank_cd,
ts_headline,
tsvector_concat,
tsvector_strip,
tsvector_setweight,
tsvector_length,
)

# XML functions
from .xml import (
xmlparse,
xpath_query,
xpath_exists,
xml_is_well_formed,
)


__all__ = [
# Range functions
Expand Down Expand Up @@ -171,4 +199,24 @@
"jsonb_path_query_first",
"jsonb_path_exists",
"jsonb_path_match",
# Text search functions
"to_tsvector",
"to_tsquery",
"plainto_tsquery",
"phraseto_tsquery",
"websearch_to_tsquery",
"ts_matches",
"ts_matches_expr",
"ts_rank",
"ts_rank_cd",
"ts_headline",
"tsvector_concat",
"tsvector_strip",
"tsvector_setweight",
"tsvector_length",
# XML functions
"xmlparse",
"xpath_query",
"xpath_exists",
"xml_is_well_formed",
]
Loading
Loading