From 55a7fdc4a5e65be463ee99a963c31435f8365885 Mon Sep 17 00:00:00 2001 From: krasimir Date: Tue, 9 Feb 2016 10:59:18 +0000 Subject: some progress on complex queries in libsg --- src/runtime/c/sg/sg.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/runtime/c/sg/sg.h') diff --git a/src/runtime/c/sg/sg.h b/src/runtime/c/sg/sg.h index 6ef57584d..a94c28cb7 100644 --- a/src/runtime/c/sg/sg.h +++ b/src/runtime/c/sg/sg.h @@ -25,7 +25,7 @@ sg_rollback(SgSG* sg, GuExn* err); SgId -sg_insert_expr(SgSG *sg, PgfExpr expr, GuExn* err); +sg_insert_expr(SgSG *sg, PgfExpr expr, int wrFlag, GuExn* err); PgfExpr sg_get_expr(SgSG *sg, SgId key, GuPool* out_pool, GuExn* err); @@ -61,17 +61,13 @@ sg_triple_result_get_query(SgTripleResult* tres, SgTriple triple); void sg_triple_result_close(SgTripleResult* tres, GuExn* err); -typedef int SgPattern[3]; - -typedef struct { - SgId* sel; - SgId* vars; - size_t n_patterns; - SgPattern patterns[]; -} SgQuery; - +typedef struct SgQuery SgQuery; typedef struct SgQueryResult SgQueryResult; +SgQuery* +sg_prepare_query(SgSG *sg, size_t n_triples, SgTriple* triples, + GuPool* pool, GuExn* err); + SgQueryResult* sg_query(SgSG *sg, SgQuery* query, GuExn* err); -- cgit v1.2.3