Repository navigation
test(feature-query): contract natural-key find_one_or_create - #29
Merged
Merged
Conversation
Cover create-only defaults, existing-row returns, lookup validation, composite-model natural keys and conflict re-raise, with sync/async parity.
|
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 the shared sync/async contract for
find_one_or_createon a natural key.lookupplusdefaults, returning an existing row without applying defaults, andlookupwinning overdefaultson the created row.Nonelookup values, expression values and database-generated primary keys are rejected.created=False; an unexplained constraint failure is re-raised.rhosocial/python-activerecord#134.Adds: N/A (no tracking issue).
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):
N/A
Applicable
rhosocial-activerecordVersion Range:rhosocial-activerecord>=1.0.0.dev30,<2.0.0Related Repositories/Packages
rhosocial/python-activerecordbranchfeature/find-one-or-createadds the method.Testing
Test Plan:
The companion core PR installs this testsuite branch and runs the full core matrix.
Checklist
README.md, etc.).changelog.d/<issue_number>.<type>.md).Additional Notes
This repository has no self-test workflow. The shared tests are validated by the companion core CI run. The changelog fragment is intentionally added after the PR number and CI result are known.