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/25.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added enhanced mathematical functions to PostgreSQL backend, including round_, pow, power, sqrt, mod, ceil, floor, trunc, max_, min_, and avg, with proper naming to avoid conflicts with Python builtins.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- 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
- math_enhanced: Enhanced math functions - https://www.postgresql.org/docs/current/functions-math.html
"""

# Range functions
Expand Down Expand Up @@ -130,6 +131,21 @@
xml_is_well_formed,
)

# Math enhanced functions
from .math_enhanced import (
round_,
pow,
power,
sqrt,
mod,
ceil,
floor,
trunc,
max_,
min_,
avg,
)


__all__ = [
# Range functions
Expand Down Expand Up @@ -219,4 +235,16 @@
"xpath_query",
"xpath_exists",
"xml_is_well_formed",
# Math enhanced functions
"round_",
"pow",
"power",
"sqrt",
"mod",
"ceil",
"floor",
"trunc",
"max_",
"min_",
"avg",
]
Loading
Loading