Repository navigation
feat(mariadb): render seconds_between with microsecond TIMESTAMPDIFF - #13
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v1.0.0.dev3 #13 +/- ##
=======================================================
+ Coverage 75.38% 75.39% +0.01%
=======================================================
Files 139 139
Lines 8852 8857 +5
Branches 1232 1232
=======================================================
+ Hits 6673 6678 +5
Misses 1805 1805
Partials 374 374
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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
Implements the backend half of the portable
seconds_betweenexpression added inrhosocial/python-activerecord#129:
format_seconds_between_expression()rendersend - startin signed, fractional seconds. The formatter rendersTIMESTAMPDIFF(MICROSECOND, start, end) / 1000000, which keeps the fraction MariaDB stores.The core raises
UnsupportedFeatureErroruntil a dialect adapts the hook, so thischange is what makes the expression usable on this engine. The implementation lives in
src/rhosocial/activerecord/backend/impl/mariadb/mixins/datetime.py.Type of change
feat: A new featuredocs: Documentation for the new capabilitytest: Tests for the new capabilitychore: CI installs the core from the feature branch (see below)perf/ci/build/revert: not applicableBreaking Change
Impact on End-Users:
No backward-incompatible changes are expected: the expression is new, and nothing
existing changes shape.
Impact on Backend Developers (Custom Implementations):
None. The dialect hook is additive; implementations that do not override it keep
inheriting the core refusal.
Related Repositories/Packages
Requires rhosocial/python-activerecord#129 (branch
feature/extract-epoch)..github/workflows/test.ymlnow installs the core fromfeature/extract-epochinstead of
release/v1.0.0.dev30, so CI exercises the core change and this backendtogether (see the
chore(ci)commit on this branch). That pin is temporary: it shouldgo back to the release branch once the core PR merges.
Testing
Test Plan:
tests/rhosocial/activerecord_mariadb_test/feature/backend/test_mariadb_seconds_between.pyChecklist
README.md, etc.).Additional Notes
The changelog fragment is intentionally deferred until the PR number exists; it is
added as
changelog.d/<pr_number>.added.mdright after the PR opens.