-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make aql query more robust #280
Conversation
Add UPPER string conversion
Still requires a start node
Moved the AND/OR functionality to issue #282 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see one small change you can make to simplify things even more with the query
In general, I think we should offer more query operators for both nodes and edges. I can see use cases for >, <, !=, etc. Is that something you're considering?
I verified:
- * for nodes + edges
- edge filtering
- remove unnecessary arguments
- make query not case sensitive
I can't run a query that queries the network for edge.value == 15
with no nodes. I'm not sure if that's a query we should allow, or not, though. (looks like this is covered by #283)
for (let i = 0; i < selectedHops.value; i += 1) { | ||
if (i === 0 && edgeVariableValue.value[i] !== '') { | ||
pathQueryText += ` FILTER p.edges[${i}].${edgeVariable.value[i]} == '${edgeVariableValue.value[i]}'`; | ||
} else if (edgeVariableValue.value[i] !== '') { | ||
pathQueryText += ` AND p.edges[${i}].${edgeVariable.value[i]} == '${edgeVariableValue.value[i]}'`; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't these have query operators?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because edge selection will always be precise for the marclab... But now I'm not sure if it makes sense in other use cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see one small change you can make to simplify things even more with the query
In general, I think we should offer more query operators for both nodes and edges. I can see use cases for >, <, !=, etc. Is that something you're considering?
I verified:
- * for nodes + edges
- edge filtering
- remove unnecessary arguments
- make query not case sensitive
I can't run a query that queries the network for
edge.value == 15
with no nodes. I'm not sure if that's a query we should allow, or not, though. (looks like this is covered by #283)
Yes so currently the first node needs to be selected in order to run a query successfully.
I've also created an issue to address numerical queries #284 , which I think we agreed on slack will be a later functionality
Co-authored-by: Jack Wilburn <jackwilburn@tutanota.com>
Closes issue #278
To Do:
AND/OR functionality on edges