refactor: use batching for SHACL/Flow link operations#685
Merged
lucksus merged 1 commit intofeat/shacl-sdna-migrationfrom Feb 19, 2026
Merged
refactor: use batching for SHACL/Flow link operations#685lucksus merged 1 commit intofeat/shacl-sdna-migrationfrom
lucksus merged 1 commit intofeat/shacl-sdna-migrationfrom
Conversation
…ry for reads Addresses review feedback from @lucksus on PR #654: - Move SHACLShape and SHACLFlow imports to top-level instead of inline dynamic imports - Use addLinks() batch API instead of individual add() calls in addShacl() and addFlow() - Use single querySurrealDB() call instead of many get() calls in getShacl() and getFlow()
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
lucksus
approved these changes
Feb 19, 2026
| predicate: "ad4m://destructor" | ||
| })); | ||
| shapeLinks.push(...destructorLinks.map(l => l.data)); | ||
| const query = `SELECT in.uri AS source, predicate, out.uri AS target FROM link WHERE in.uri IN [${escapedSources}]`; |
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.
Addresses review feedback from @lucksus on #654:
Changes:
SHACLShapeandSHACLFlowimports from inlineimport()to top-level static importsaddShacl()andaddFlow()now useaddLinks()to batch all links in a single call instead of individualadd()callsgetShacl()andgetFlow()now use a singlequerySurrealDB()call instead of many individualget()callsNet result: ~74 lines added, ~146 removed. Much fewer round-trips to the executor.