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
[develop < T0041-GA] Fix label filtering in where queries #103
Merged
Conversation
This file contains 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
This was
linked to
issues
Mar 14, 2022
katarinasupe
changed the title
Add example usage of class properties
Fix label filtering in where and add new tests
Mar 28, 2022
katarinasupe
changed the title
Fix label filtering in where and add new tests
Fix label filtering in where queries and add new tests
Mar 28, 2022
katarinasupe
added
status: ready
PR is ready for review
and removed
status: change
PR reviewed - needs changes
labels
Mar 28, 2022
brunos252
reviewed
Mar 28, 2022
g-despot
approved these changes
Mar 29, 2022
katarinasupe
changed the title
Fix label filtering in where queries and add new tests
[develop < T0041-GA] Fix label filtering in where queries
Mar 29, 2022
Please ignore |
BorisTasevski
suggested changes
Mar 30, 2022
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.
Classes as fixtures should also be discussed here
Josipmrden
reviewed
Mar 30, 2022
BorisTasevski
approved these changes
Mar 30, 2022
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.
In this PR, I wanted to check how to create private properties which won't be saved in the database and how to load a node with partial properties, that is, how to load a node with only required properties provided.
That is related to issues #88 and #79.
Conclusions:
A property without
Field()
will be saved into Memgraph. If you don't want a property to be saved into Memgraph, declare it as private property (e.g._name
). All properties can be used withoutField()
and schema validation will still work.Field
must be used when defining additional fields, such as constraints and indexes.I think it's okay that load works the way it does. If we want to fetch nodes by one property, we can use query builder, that is
match()
.While working on this, I noticed a couple of more things I added to this PR:
WHERE
clause and all its versions (and, or, xor) had label filtering added, but this was not tested. I added tests and fixed methods in the query builder accordingly.Changed
property
toitem
inxor_where()
argumentsFixed
WHERE
methods in query builder (where, and where, or where, xor where) to work with labelsAdded tests for label filtering in
WHERE
methods (where, and where, or where, xor where)Added tests for node loading and properties usage