Repository navigation
feat(postgres): add math enhanced functions with proper naming - #25
Merged
vistart merged 2 commits intoApr 9, 2026
Merged
Conversation
- round_ (round is Python builtin) - pow, power (POWER alias) - sqrt, mod, ceil, floor, trunc - max_, min_ (GREATEST/LEAST for scalar, MAX/MIN for aggregate) - avg (AVG aggregate) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v1.0.0.dev10 #25 +/- ##
========================================================
+ Coverage 72.73% 72.93% +0.19%
========================================================
Files 121 122 +1
Lines 6867 6924 +57
Branches 1139 1144 +5
========================================================
+ Hits 4995 5050 +55
- Misses 1470 1471 +1
- Partials 402 403 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
4 of 12 tasks
vistart
added a commit
that referenced
this pull request
Apr 12, 2026
* feat(postgres): add math enhanced functions with proper naming - round_ (round is Python builtin) - pow, power (POWER alias) - sqrt, mod, ceil, floor, trunc - max_, min_ (GREATEST/LEAST for scalar, MAX/MIN for aggregate) - avg (AVG aggregate) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: add changelog fragment for PR #25 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Adds enhanced mathematical functions to the PostgreSQL backend with proper naming to avoid conflicts with Python builtins.
Functions Added
round_ROUND()pow,powerPOWER()sqrtSQRT()modMOD()ceilCEIL()floorFLOOR()truncTRUNC()max_,min_GREATEST/LEASTmax_,min_MAX/MINavgAVG()Problem Solved
This feature provides properly named mathematical functions that:
roundvsround_)Type of change
feat: A new featuredocs: Documentation only changes (if related to the new feature)perf: A code change that improves performance (if part of the feature)test: Adding missing tests or correcting existing tests (for the new feature)chore: Changes to the build process or auxiliary tools and libraries suchs as documentation generation (if related to the new feature)ci: Changes to our CI configuration files and scripts (if related to the new feature)build: Changes that affect the build system or external dependencies (if related to the new feature)revert: Reverts a previous commitBreaking Change
(If Yes, please describe the impact and migration path below):
Applicable
rhosocial-activerecordVersion Range:>=1.0.0,<2.0.0Related Repositories/Packages
N/A
Testing
Test Plan:
Test file:
tests/rhosocial/activerecord_test/backend/postgres/test_postgres_math_enhanced_functions.pyChecklist
README.md, etc.).changelog.d/<issue_number>.<type>.md).Additional Notes
Files Changed:
src/rhosocial/activerecord/backend/impl/postgres/functions/__init__.py- Export additionssrc/rhosocial/activerecord/backend/impl/postgres/functions/math_enhanced.py- New functions (381 lines)tests/rhosocial/activerecord_test/backend/postgres/test_postgres_math_enhanced_functions.py- Tests (258 lines)Total: 3 files changed, 667 insertions(+)