Merged
Conversation
Following the pattern of neomodel.sync_.core.Database where all instance properties are threading-local (except global mappings _NODE_CLASS_REGISTRY and _DB_SPECIFIC_CLASS_REGISTRY), I've converted the same properties of AsyncDatabase to ContextVars (to be context-local instance properties).
…abase-transactions
…abase-transactions
…abase-transactions
…ions Fix for AsyncDatabase and parallel transactions #888 ?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #900 +/- ##
==========================================
+ Coverage 87.17% 88.25% +1.08%
==========================================
Files 36 41 +5
Lines 5956 6368 +412
==========================================
+ Hits 5192 5620 +428
+ Misses 764 748 -16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Remove deprecated methods for 6.0.0
Rc/6.0.0 eol python3.9
…ces in FastAPI & Multi-DB Scenarios #868
Various doc improvements / fixes
Add merge_by parameter
…ss-resolution-for-raw-queries-does-not-work-if-the-node-is-nested-in-a-map-from-cypher
…tion-for-raw-queries-does-not-work-if-the-node-is-nested-in-a-map-from-cypher Fixes resolve_objects for maps and lists
Allow setting relationship properties when creating nodes with relationships
in async methods.
Example:
await Dog.get_or_create(
{"name": "Gizmo"},
relationship=bob.pets,
rel_props={"since": datetime(2020, 1, 1)}
)
- Uses _rel_merge_helper for proper property handling
- Includes validation and async tests
- Sync version to follow
Add tests for create_or_update() with relationship properties: - Single node with rel_props - Batch nodes with shared rel_props Ensures create_or_update() properly supports the rel_props parameter added to _build_merge_query().
Mirror the async implementation to add relationship properties support
to sync methods.
Both get_or_create() and create_or_update() now support rel_props
parameter in sync API, maintaining parity with async version.
Example:
Dog.get_or_create(
{"name": "Gizmo"},
relationship=bob.pets,
rel_props={"since": datetime(2020, 1, 1)}
)
Extract validation and deflation logic into dedicated helper methods to reduce cognitive complexity. - _validate_relationship(): Validates relationship manager and model - _deflate_relationship_properties(): Deflates rel_props for Cypher No behavioral changes.
Add type stubs for type checking
Add support for relationship properties in `get_or_create()` and `create_or_update()`
|
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.



No description provided.