diff options
author | David Robillard <d@drobilla.net> | 2019-12-18 19:16:14 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f (patch) | |
tree | fe49db88bd8e914580b67f9664af0cce2fdcd3a8 /serd | |
parent | 7f508b89230b339684a4013dbbad741d9e16e40a (diff) | |
download | serd-a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f.tar.gz serd-a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f.tar.bz2 serd-a1e6f53715ba7be340d4a59a9878d0ca2c7c6c3f.zip |
WIP: Add statement filtering
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index 794fe285..78a1d0cf 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -1243,6 +1243,22 @@ SerdSink* serd_normaliser_new(const SerdSink* target, const SerdEnv* env); /** + 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_filter_new(const SerdSink* target, + const SerdNode* subject, + const SerdNode* predicate, + const SerdNode* object, + const SerdNode* graph); + +/** @} @name Reader @{ |