diff options
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 16 |
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 @{ |