Implement deep query planner/executor for nested where conditions#47
Open
Implement deep query planner/executor for nested where conditions#47
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #7
- Added comprehensive deep query processing in LinksQuery.GetLinks() - Support for all logical operators: _and, _or, _not - Support for nested relationship filtering: from, to, type, in, out - Support for all comparison operators: _eq, _neq, _gt, _gte, _lt, _lte, _in, _nin, _is_null - Fixed type inconsistency: LinksBooleanExpression.type_id now uses LongComparisonExpression - Added 8 new test cases covering deep query functionality - Maintains backward compatibility with existing simple queries - All tests pass (11/11 query tests, 5/5 mutation tests) Resolves issue #7 - Support deep (multiple layers) of where query argument. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <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.
Summary
whereconditions as requested in issue Deep query planner/executor #7_and,_or,_notfrom,to,type,in,out_eq,_neq,_gt,_gte,_lt,_lte,_in,_nin,_is_nullLinksBooleanExpression.type_idfieldImplementation Details
LinksQuery.GetLinks()to handle complex nested where clausesEvaluateWhereClause()method that recursively processes nested conditionsfrom.id,to.id, etc.)Examples of Supported Queries
Logical Operators
{ links(where: { _and: [ { id: { _gt: 0 } } { from_id: { _eq: 1 } } ] }) { id from_id to_id } }Nested Relationships
{ links(where: { from: { id: { _gt: 0 } } to: { id: { _lt: 100 } } }) { id from_id to_id from { id } to { id } } }Outgoing/Incoming Links
{ links(where: { out: { to_id: { _gt: 0 } } in: { from_id: { _gt: 0 } } }) { id from_id to_id out { id to_id } in { id from_id } } }Test Coverage
Bug Fixes
LinksBooleanExpression.type_idnow correctly usesLongComparisonExpressioninstead ofLinksBooleanExpression🤖 Generated with Claude Code
Resolves #7