diff options
Diffstat (limited to 'sord/sord.h')
-rw-r--r-- | sord/sord.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/sord/sord.h b/sord/sord.h index 9bd3f02..9c4baf8 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -367,7 +367,7 @@ SordIter* sord_begin(const SordModel* model); /** - Search for a triple pattern. + Search for statements by a quad pattern. @return an iterator to the first match, or NULL if no matches found. */ SORD_API @@ -375,6 +375,40 @@ SordIter* sord_find(SordModel* model, const SordQuad pat); /** + Search for statements by nodes. + @return an iterator to the first match, or NULL if no matches found. +*/ +SORD_API +SordIter* +sord_search(SordModel* model, + const SordNode* s, + const SordNode* p, + const SordNode* o, + const SordNode* g); + +/** + Return true iff a statement exists. +*/ +SORD_API +bool +sord_ask(SordModel* model, + const SordNode* s, + const SordNode* p, + const SordNode* o, + const SordNode* g); + +/** + Return the number of matching statements. +*/ +SORD_API +uint64_t +sord_count(SordModel* model, + const SordNode* s, + const SordNode* p, + const SordNode* o, + const SordNode* g); + +/** Check if @a model contains a triple pattern. */ SORD_API |