aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-12-18 19:16:14 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:36:32 -0500
commit0c347c9701af4595a68bb37eb7c69b5db2d452f8 (patch)
tree2c41e70b44211c00fbc0f3830db886c8d0b1b85e /include
parentf7c7115e0555f25e0f2c6d09378b66aec2d41d76 (diff)
downloadserd-0c347c9701af4595a68bb37eb7c69b5db2d452f8.tar.gz
serd-0c347c9701af4595a68bb37eb7c69b5db2d452f8.tar.bz2
serd-0c347c9701af4595a68bb37eb7c69b5db2d452f8.zip
WIP: Add statement filtering
Diffstat (limited to 'include')
-rw-r--r--include/serd/serd.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 8eb5470d..68dec4f3 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1487,6 +1487,22 @@ serd_canon_new(const SerdWorld* SERD_NULLABLE world,
SerdReaderFlags flags);
/**
+ Return a sink that filters out statements that do not match a pattern.
+
+ The returned sink acts like `target` in all respects, except statements that
+ do not match the pattern are dropped. Only statements where each node is
+ either equivalent to the corresponding pattern node, or the pattern node is
+ null, will be passed through to the target sink.
+*/
+SERD_API
+SerdSink* SERD_ALLOCATED
+serd_filter_new(const SerdSink* SERD_NONNULL target,
+ const SerdNode* SERD_NULLABLE subject,
+ const SerdNode* SERD_NULLABLE predicate,
+ const SerdNode* SERD_NULLABLE object,
+ const SerdNode* SERD_NULLABLE graph);
+
+/**
@}
@defgroup serd_reader Reader
@{