aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-10 22:01:30 -0400
committerDavid Robillard <d@drobilla.net>2022-01-14 19:37:51 -0500
commit07b716c38625dd954be279e3476164b5bb1d6293 (patch)
tree3b2d75ab74dad40c7d54d2dbee2fcad3d54f6935 /include/serd
parent94eeeadeb5be3d9c9266bed5d3c32c6ff29695b4 (diff)
downloadserd-07b716c38625dd954be279e3476164b5bb1d6293.tar.gz
serd-07b716c38625dd954be279e3476164b5bb1d6293.tar.bz2
serd-07b716c38625dd954be279e3476164b5bb1d6293.zip
Add serd_statement_matches()
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 5d0f7290..cec77649 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1177,6 +1177,20 @@ serd_statement_equals(const SerdStatement* SERD_NULLABLE a,
const SerdStatement* SERD_NULLABLE b);
/**
+ Return true iff the statement matches the given pattern.
+
+ Nodes match if they are equivalent, or if one of them is NULL. The
+ statement matches if every node matches.
+*/
+SERD_PURE_API
+bool
+serd_statement_matches(const SerdStatement* SERD_NONNULL statement,
+ const SerdNode* SERD_NULLABLE subject,
+ const SerdNode* SERD_NULLABLE predicate,
+ const SerdNode* SERD_NULLABLE object,
+ const SerdNode* SERD_NULLABLE graph);
+
+/**
@}
@defgroup serd_world World
@{