Skip to content
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

Introduce Not for GraphNameMatcher and TermMatcher #174

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

mkatychev
Copy link
Contributor

@mkatychev mkatychev commented Jul 26, 2024

It was often found handy to exclude certain terms or graph names during a filter:

let my_graph_name: SimpleTerm<'static> =
    default_namespace.get_unchecked("#my_graph").into_term();
let ds_without_my_graph: Vec<Spog<SimpleTerm>> = dataset
    .quads_matching(Any, Any, Any, Not(Some(my_graph_name)))
    .collect_quads()
    .unwrap();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If unit tests are needed, I'd like to know what module they should go under.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all tests for (GraphName|Term)Matcher are currently in api/src/term/matcher.rs. Having tests for Not would indeed be nice.

@mkatychev mkatychev changed the title Introduce Not matcher for GraphNameMatcher and TermMatcher Introduce Not for GraphNameMatcher and TermMatcher Jul 26, 2024
api/src/term/matcher/_any.rs Outdated Show resolved Hide resolved
api/src/term/matcher/_graph_name_matcher.rs Outdated Show resolved Hide resolved
@mkatychev mkatychev requested a review from pchampin July 29, 2024 17:12
@pchampin pchampin merged commit b4b827a into pchampin:main Jul 30, 2024
4 checks passed
@pchampin
Copy link
Owner

that's great; thanks

@mkatychev mkatychev deleted the feat/not-matcher branch August 6, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants