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/26.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added comprehensive PostgreSQL function support: array (18), network address (16), UUID (8), hstore (33), and range constructors (6).
181 changes: 181 additions & 0 deletions src/rhosocial/activerecord/backend/impl/postgres/functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,99 @@
avg,
)

# Array functions
from .array import (
array_agg,
array_append,
array_cat,
array_dims,
array_fill,
array_length,
array_lower,
array_ndims,
array_position,
array_positions,
array_prepend,
array_remove,
array_replace,
array_to_string,
array_upper,
unnest,
array_agg_distinct,
string_to_array,
)

# Network address functions
from .network import (
inet_client_addr,
inet_client_port,
inet_server_addr,
inet_server_port,
inet_merge,
inet_and,
inet_or,
inetnot,
inet_set_mask,
inet_masklen,
inet_netmask,
inet_network,
inet_recv,
inet_show,
cidr_netmask,
macaddr8_set7bit,
)

# UUID functions
from .uuid import (
uuid_generate_v1,
uuid_generate_v1mc,
uuid_generate_v3,
uuid_generate_v4,
uuid_generate_v5,
uuid_nil,
uuid_max,
)

# hstore functions
from .hstore import (
hstore_from_record,
hstore_from_key_value,
hstore_akeys,
hstore_skeys,
hstore_avals,
hstore_svals,
hstore_each,
hstore_to_array,
hstore_to_matrix,
hstore_to_json,
hstore_to_jsonb,
hstore_to_json_loose,
hstore_to_jsonb_loose,
hstore_slice,
hstore_exist,
hstore_defined,
hstore_delete,
hstore_delete_keys,
hstore_delete_pairs,
hstore_populate_record,
hstore_get_value,
hstore_get_values,
hstore_concat,
hstore_key_exists,
hstore_all_keys_exist,
hstore_any_key_exists,
hstore_contains,
hstore_contained_by,
hstore_subtract_key,
hstore_subtract_keys,
hstore_subtract_pairs,
hstore_to_array_operator,
hstore_to_matrix_operator,
hstore_record_update,
hstore_subscript_get,
hstore_subscript_set,
)


__all__ = [
# Range functions
Expand Down Expand Up @@ -247,4 +340,92 @@
"max_",
"min_",
"avg",
# Array functions
"array_agg",
"array_append",
"array_cat",
"array_dims",
"array_fill",
"array_length",
"array_lower",
"array_ndims",
"array_position",
"array_positions",
"array_prepend",
"array_remove",
"array_replace",
"array_to_string",
"array_upper",
"unnest",
"array_agg_distinct",
"string_to_array",
# Network address functions
"inet_client_addr",
"inet_client_port",
"inet_server_addr",
"inet_server_port",
"inet_merge",
"inet_and",
"inet_or",
"inetnot",
"inet_set_mask",
"inet_masklen",
"inet_netmask",
"inet_network",
"inet_recv",
"inet_show",
"cidr_netmask",
"macaddr8_set7bit",
# UUID functions
"uuid_generate_v1",
"uuid_generate_v1mc",
"uuid_generate_v3",
"uuid_generate_v4",
"uuid_generate_v5",
"uuid_nil",
"uuid_max",
# hstore functions
"hstore_from_record",
"hstore_from_key_value",
"hstore_akeys",
"hstore_skeys",
"hstore_avals",
"hstore_svals",
"hstore_each",
"hstore_to_array",
"hstore_to_matrix",
"hstore_to_json",
"hstore_to_jsonb",
"hstore_to_json_loose",
"hstore_to_jsonb_loose",
"hstore_slice",
"hstore_exist",
"hstore_defined",
"hstore_delete",
"hstore_delete_keys",
"hstore_delete_pairs",
"hstore_populate_record",
"hstore_get_value",
"hstore_get_values",
"hstore_concat",
"hstore_key_exists",
"hstore_all_keys_exist",
"hstore_any_key_exists",
"hstore_contains",
"hstore_contained_by",
"hstore_subtract_key",
"hstore_subtract_keys",
"hstore_subtract_pairs",
"hstore_to_array_operator",
"hstore_to_matrix_operator",
"hstore_record_update",
"hstore_subscript_get",
"hstore_subscript_set",
# Range constructors
"int4range",
"int8range",
"numrange",
"tsrange",
"tstzrange",
"daterange",
]
Loading
Loading