Rasqal RDF Query Library Manual | ||||
---|---|---|---|---|
Top | Description |
typedef rasqal_expression; enum rasqal_expression_flags; rasqal_evaluation_context; enum rasqal_op; enum rasqal_compare_flags; enum rasqal_pattern_flags; rasqal_expression * rasqal_new_0op_expression (rasqal_world *world
,rasqal_op op
); rasqal_expression * rasqal_new_1op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg
); rasqal_expression * rasqal_new_2op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_expression *arg2
); rasqal_expression * rasqal_new_3op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_expression *arg2
,rasqal_expression *arg3
); rasqal_expression * rasqal_new_4op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_expression *arg2
,rasqal_expression *arg3
,rasqal_expression *arg4
); rasqal_expression * rasqal_new_aggregate_function_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,raptor_sequence *params
,unsigned int flags
); rasqal_expression * rasqal_new_cast_expression (rasqal_world *world
,raptor_uri *name
,rasqal_expression *value
); rasqal_expression * rasqal_new_function_expression (rasqal_world *world
,raptor_uri *name
,raptor_sequence *args
,raptor_sequence *params
,unsigned int flags
); rasqal_expression * rasqal_new_group_concat_expression (rasqal_world *world
,unsigned int flags
,raptor_sequence *args
,rasqal_literal *separator
); rasqal_expression * rasqal_new_literal_expression (rasqal_world *world
,rasqal_literal *literal
); rasqal_expression * rasqal_new_set_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,raptor_sequence *args
); rasqal_expression * rasqal_new_string_op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_literal *literal
); rasqal_expression * rasqal_new_expression_from_expression (rasqal_expression *e
); rasqal_expression * rasqal_new_expr_seq_expression (rasqal_world *world
,rasqal_op op
,raptor_sequence *args
); void rasqal_free_expression (rasqal_expression *e
); int rasqal_expression_compare (rasqal_expression *e1
,rasqal_expression *e2
,int flags
,int *error_p
); rasqal_literal * rasqal_expression_evaluate (rasqal_world *world
,raptor_locator *locator
,rasqal_expression *e
,int flags
); rasqal_literal * rasqal_expression_evaluate2 (rasqal_expression *e
,rasqal_evaluation_context *eval_context
,int *error_p
); const char * rasqal_expression_op_label (rasqal_op op
); int rasqal_expression_print (rasqal_expression *e
,FILE *fh
); void rasqal_expression_print_op (rasqal_expression *e
,FILE *fh
); int (*rasqal_expression_visit_fn) (void *user_data
,rasqal_expression *e
); int rasqal_expression_visit (rasqal_expression *e
,rasqal_expression_visit_fn fn
,void *user_data
); rasqal_evaluation_context * rasqal_new_evaluation_context (rasqal_world *world
,raptor_locator *locator
,int flags
); void rasqal_free_evaluation_context (rasqal_evaluation_context *eval_context
); int rasqal_evaluation_context_set_base_uri (rasqal_evaluation_context *eval_context
,raptor_uri *base_uri
); int rasqal_evaluation_context_set_rand_seed (rasqal_evaluation_context *eval_context
,unsigned int seed
);
Expressions form an expression tree that can be evaluated using
rasqal_expression_evaluate()
over rasqal_op operators, rasqal_literal
constants and rasqal_variable values bound in some
rasqal_query_result. The result is a rasqal_literal value.
typedef enum { RASQAL_EXPR_FLAG_DISTINCT = 1, RASQAL_EXPR_FLAG_AGGREGATE = 2 } rasqal_expression_flags;
Flags for expressions.
typedef struct { rasqal_world *world; raptor_uri* base_uri; raptor_locator *locator; int flags; unsigned int seed; rasqal_random* random; } rasqal_evaluation_context;
A context for evaluating an expression such as with
rasqal_expression_evaluate2()
rasqal_world * |
rasqal world |
base URI of expression context (or NULL) | |
locator or NULL | |
expression comparison flags | |
random seeed | |
random number generator object |
typedef enum { /* internal */ RASQAL_EXPR_UNKNOWN, RASQAL_EXPR_AND, RASQAL_EXPR_OR, RASQAL_EXPR_EQ, RASQAL_EXPR_NEQ, RASQAL_EXPR_LT, RASQAL_EXPR_GT, RASQAL_EXPR_LE, RASQAL_EXPR_GE, RASQAL_EXPR_UMINUS, RASQAL_EXPR_PLUS, RASQAL_EXPR_MINUS, RASQAL_EXPR_STAR, RASQAL_EXPR_SLASH, RASQAL_EXPR_REM, RASQAL_EXPR_STR_EQ, RASQAL_EXPR_STR_NEQ, RASQAL_EXPR_STR_MATCH, RASQAL_EXPR_STR_NMATCH, RASQAL_EXPR_TILDE, RASQAL_EXPR_BANG, RASQAL_EXPR_LITERAL, RASQAL_EXPR_FUNCTION, RASQAL_EXPR_BOUND, RASQAL_EXPR_STR, RASQAL_EXPR_LANG, RASQAL_EXPR_DATATYPE, RASQAL_EXPR_ISURI, RASQAL_EXPR_ISBLANK, RASQAL_EXPR_ISLITERAL, RASQAL_EXPR_CAST, RASQAL_EXPR_ORDER_COND_ASC, RASQAL_EXPR_ORDER_COND_DESC, RASQAL_EXPR_LANGMATCHES, RASQAL_EXPR_REGEX, RASQAL_EXPR_GROUP_COND_ASC, RASQAL_EXPR_GROUP_COND_DESC, RASQAL_EXPR_COUNT, RASQAL_EXPR_VARSTAR, RASQAL_EXPR_SAMETERM, RASQAL_EXPR_SUM, RASQAL_EXPR_AVG, RASQAL_EXPR_MIN, RASQAL_EXPR_MAX, RASQAL_EXPR_COALESCE, RASQAL_EXPR_IF, RASQAL_EXPR_URI, RASQAL_EXPR_IRI, RASQAL_EXPR_STRLANG, RASQAL_EXPR_STRDT, RASQAL_EXPR_BNODE, RASQAL_EXPR_GROUP_CONCAT, RASQAL_EXPR_SAMPLE, RASQAL_EXPR_IN, RASQAL_EXPR_NOT_IN, RASQAL_EXPR_ISNUMERIC, RASQAL_EXPR_YEAR, RASQAL_EXPR_MONTH, RASQAL_EXPR_DAY, RASQAL_EXPR_HOURS, RASQAL_EXPR_MINUTES, RASQAL_EXPR_SECONDS, RASQAL_EXPR_TIMEZONE, RASQAL_EXPR_CURRENT_DATETIME, RASQAL_EXPR_NOW, RASQAL_EXPR_FROM_UNIXTIME, RASQAL_EXPR_TO_UNIXTIME, RASQAL_EXPR_CONCAT, RASQAL_EXPR_STRLEN, RASQAL_EXPR_SUBSTR, RASQAL_EXPR_UCASE, RASQAL_EXPR_LCASE, RASQAL_EXPR_STRSTARTS, RASQAL_EXPR_STRENDS, RASQAL_EXPR_CONTAINS, RASQAL_EXPR_ENCODE_FOR_URI, RASQAL_EXPR_TZ, RASQAL_EXPR_RAND, RASQAL_EXPR_ABS, RASQAL_EXPR_ROUND, RASQAL_EXPR_CEIL, RASQAL_EXPR_FLOOR, RASQAL_EXPR_MD5, RASQAL_EXPR_SHA1, RASQAL_EXPR_SHA224, RASQAL_EXPR_SHA256, RASQAL_EXPR_SHA384, RASQAL_EXPR_SHA512, RASQAL_EXPR_STRBEFORE, RASQAL_EXPR_STRAFTER, RASQAL_EXPR_REPLACE, RASQAL_EXPR_UUID, RASQAL_EXPR_STRUUID, /* internal */ RASQAL_EXPR_LAST = RASQAL_EXPR_STRUUID } rasqal_op;
Rasqal expression operators. A mixture of unary, binary and tertiary operators (string matches). Also includes casting and two ordering operators from ORDER BY in SPARQL.
Internal | |
Expression for AND(A, B) | |
Expression for OR(A, B) | |
Expression for A equals B | |
Expression for A not equals B. | |
Expression for A less than B. | |
Expression for A greather than B. | |
Expression for A less than or equal to B. | |
Expression for A greater than or equal to B. | |
Expression for -A. | |
Expression for +A. | |
Expression for A-B. | |
Expression for A*B. | |
Expression for A/B. | |
Expression for A/B remainder. | |
Expression for A string equals B. | |
Expression for A string not-equals B. | |
Expression for string A matches literal regex B with flags. | |
Expression for string A not-matches literal regex B with flags. | |
Expression for binary not A. | |
Expression for logical not A. | |
Expression for a rasqal_literal. | |
Expression for a function A with arguments (B...). | |
Expression for SPARQL ISBOUND(A). | |
Expression for SPARQL STR(A). | |
Expression for SPARQL LANG(A). | |
Expression for SPARQL DATATYPE(A). | |
Expression for SPARQL ISURI(A). | |
Expression for SPARQL ISBLANK(A). | |
Expression for SPARQL ISLITERAL(A). | |
Expression for cast literal A to type B. | |
Expression for SPARQL order condition ascending. | |
Expression for SPARQL order condition descending. | |
Expression for SPARQL LANGMATCHES(A, B). | |
Expression for string A matches expression regex B with flags. | |
Obsolete - not used | |
Obsolete - not used | |
Expression for LAQRS select COUNT() aggregate function
|
|
Expression for LAQRS select Variable * | |
Expression for SPARQL sameTerm | |
Expression for LAQRS select SUM() aggregate function
|
|
Expression for LAQRS select AVG() aggregate function
|
|
Expression for LAQRS select MIN() aggregate function
|
|
Expression for LAQRS select MAX() aggregate function
|
|
Expression for LAQRS COALESCE(Expr+) | |
Expression for LAQRS IF(expr, expr, expr) | |
Expression for LAQRS URI(expr) | |
Expression for LAQRS IRI(expr) | |
Expression for LAQRS STRLANG(expr, expr) | |
Expression for LAQRS STRDT(expr, expr) | |
Expression for LAQRS BNODE() and BNODE(expr)
|
|
Expression for LAQRS GROUP_CONCAT(arglist) aggregate function | |
Expression for LAQRS SAMPLE(expr) aggregate function | |
Expression for LAQRS expr IN ( list of expr ) | |
Expression for LAQRS expr NOT IN ( list of expr ) | |
Expression for SPARQL 1.1 isNUMERIC(expr) | |
Expression for SPARQL 1.1 YEAR(datetime) | |
Expression for SPARQL 1.1 MONTH(datetime) | |
Expression for SPARQL 1.1 DAY(datetime) | |
Expression for SPARQL 1.1 HOURS(datetime) | |
Expression for SPARQL 1.1 MINUTES(datetime) | |
Expression for SPARQL 1.1 SECONDS(datetime) | |
Expression for SPARQL 1.1 TIMEZONE(datetime) | |
Expression for LAQRS CURRENT_DATETIME( void ) | |
Expression for LAQRS NOW( void ) | |
Expression for LAQRS FROM_UNIXTIME(int) | |
Expression for LAQRS TO_UNIXTIME(datetime) | |
Expression for SPARQL 1.1 CONCAT(strings) | |
Expression for SPARQL 1.1 STRLEN(str) | |
Expression for SPARQL 1.1 SUBSTR(str, start[,offset]) | |
Expression for SPARQL 1.1 UCASE(str) | |
Expression for SPARQL 1.1 LCASE(str) | |
Expression for SPARQL 1.1 STRSTARTS(str, str) | |
Expression for SPARQL 1.1 STRENDS(str, str) | |
Expression for SPARQL 1.1 CONTAINS(str, str) | |
Expression for SPARQL 1.1 ENCODE_FOR_URI(str) | |
Expression for SPARQL 1.1 TZ()
|
|
Expression for SPARQL 1.1 RAND()
|
|
Expression for SPARQL 1.1 ABS()
|
|
Expression for SPARQL 1.1 ROUND()
|
|
Expression for SPARQL 1.1 CEIL()
|
|
Expression for SPARQL 1.1 FLOOR()
|
|
Expression for SPARQL 1.1 MD5()
|
|
Expression for SPARQL 1.1 SHA1()
|
|
Expression for SPARQL 1.1 SHA224()
|
|
Expression for SPARQL 1.1 SHA256()
|
|
Expression for SPARQL 1.1 SHA384()
|
|
Expression for SPARQL 1.1 SHA512()
|
|
Expression for SPARQL 1.1 STRBEFORE()
|
|
Expression for SPARQL 1.1 STRAFTER()
|
|
Expression for SPARQL 1.1 REPLACE()
|
|
Expression for SPARQL 1.1 UUID()
|
|
Expression for SPARQL 1.1 STRUUID()
|
|
Internal |
typedef enum { RASQAL_COMPARE_NOCASE = 1, RASQAL_COMPARE_XQUERY = 2, RASQAL_COMPARE_RDF = 4, RASQAL_COMPARE_URI = 8, RASQAL_COMPARE_SAMETERM = 16 } rasqal_compare_flags;
Flags for rasqal_expression_evaluate()
, rasqal_literal_compare()
or
rasqal_literal_as_string_flags()
String comparisons are case independent. | |
XQuery comparsion rules apply. | |
RDF Term comparsion rules apply. | |
Allow comparison of URIs and allow strings to have a boolean value (unused; was for RDQL) | |
SPARQL sameTerm() builtin rules apply.
|
typedef enum { RASQAL_PATTERN_FLAGS_OPTIONAL = 1, RASQAL_PATTERN_FLAGS_LAST = RASQAL_PATTERN_FLAGS_OPTIONAL } rasqal_pattern_flags;
Flags for rasqal_graph_pattern.
rasqal_expression * rasqal_new_0op_expression (rasqal_world *world
,rasqal_op op
);
Constructor - create a new 0-operand (constant) expression.
The operators are:
RASQAL_EXPR_VARSTAR
The only operator here is the '*' in COUNT(*) as used by LAQRS.
|
rasqal_world object |
|
Expression operator |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_1op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg
);
Constructor - create a new 1-operand expression. Takes ownership of the operand expression.
The operators are:
RASQAL_EXPR_TILDE
RASQAL_EXPR_BANG
RASQAL_EXPR_UMINUS
RASQAL_EXPR_BOUND
RASQAL_EXPR_STR
RASQAL_EXPR_LANG
RASQAL_EXPR_LANGMATCHES
RASQAL_EXPR_DATATYPE
RASQAL_EXPR_ISURI
RASQAL_EXPR_ISBLANK
RASQAL_EXPR_ISLITERAL
RASQAL_EXPR_ORDER_COND_ASC
RASQAL_EXPR_ORDER_COND_DESC
RASQAL_EXPR_COUNT
RASQAL_EXPR_SUM
RASQAL_EXPR_AVG
RASQAL_EXPR_MIN
RASQAL_EXPR_MAX
The operator RASQAL_EXPR_TILDE
is not used by SPARQL (formerly RDQL).
|
rasqal_world object |
|
Expression operator |
|
Operand 1 |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_2op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_expression *arg2
);
Constructor - create a new 2-operand expression. Takes ownership of the operand expressions.
The operators are:
RASQAL_EXPR_AND
RASQAL_EXPR_OR
RASQAL_EXPR_EQ
RASQAL_EXPR_NEQ
RASQAL_EXPR_LT
RASQAL_EXPR_GT
RASQAL_EXPR_LE
RASQAL_EXPR_GE
RASQAL_EXPR_PLUS
RASQAL_EXPR_MINUS
RASQAL_EXPR_STAR
RASQAL_EXPR_SLASH
RASQAL_EXPR_REM
RASQAL_EXPR_STR_EQ
RASQAL_EXPR_STR_NEQ
RASQAL_EXPR_REM
RASQAL_EXPR_STR_EQ
, RASQAL_EXPR_STR_NEQ
and
RASQAL_EXPR_REM
are unused (formerly RDQL).
|
rasqal_world object |
|
Expression operator |
|
Operand 1 |
|
Operand 2 |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_3op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_expression *arg2
,rasqal_expression *arg3
);
Constructor - create a new 3-operand expression. Takes ownership of the operands.
The operators are: RASQAL_EXPR_REGEX RASQAL_EXPR_IF RASQAL_EXPR_SUBSTR
|
rasqal_world object |
|
Expression operator |
|
Operand 1 |
|
Operand 2 |
|
Operand 3 (may be NULL) |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_4op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_expression *arg2
,rasqal_expression *arg3
,rasqal_expression *arg4
);
Constructor - create a new 4-operand expression. Takes ownership of the operands.
The operators are: RASQAL_EXPR_REPLACE
|
rasqal_world object |
|
Expression operator |
|
Operand 1 |
|
Operand 2 |
|
Operand 3 |
|
Operand 4 (may be NULL) |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_aggregate_function_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,raptor_sequence *params
,unsigned int flags
);
Constructor - create a new 1-arg aggregate function expression for a builtin aggregate function
Takes ownership of the args
and params
|
rasqal_world object |
|
built-in aggregate function expression operator |
|
rasqal_expression argument to aggregate function |
|
sequence of rasqal_expression function parameters (or NULL) |
|
extension function bitflags |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_cast_expression (rasqal_world *world
,raptor_uri *name
,rasqal_expression *value
);
Constructor - create a new expression for casting and expression to a datatype. Takes ownership of the datatype uri and expression value.
|
rasqal_world object |
|
cast datatype URI |
|
expression value to cast to datatype type |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_function_expression (rasqal_world *world
,raptor_uri *name
,raptor_sequence *args
,raptor_sequence *params
,unsigned int flags
);
Constructor - create a new expression for a URI-named function with arguments and optional parameters.
Takes ownership of the name
, args
and params
arguments.
|
rasqal_world object |
|
function name |
|
sequence of rasqal_expression function arguments |
|
sequence of rasqal_expression function parameters (or NULL) |
|
extension function bitflags |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_group_concat_expression (rasqal_world *world
,unsigned int flags
,raptor_sequence *args
,rasqal_literal *separator
);
Constructor - create a new SPARQL group concat expression
Takes an optional distinct flag, a list of expressions and an optional separator string.
Takes ownership of the args
and separator
|
rasqal_world object |
|
bitset of flags. Only RASQAL_EXPR_FLAG_DISTINCT is defined |
|
sequence of rasqal_expression list arguments |
|
SEPARATOR string literal or NULL |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_literal_expression (rasqal_world *world
,rasqal_literal *literal
);
Constructor - create a new expression for a rasqal_literal Takes ownership of the operand literal.
|
rasqal_world object |
|
Literal operand 1 |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_set_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,raptor_sequence *args
);
Constructor - create a new set IN/NOT IN operation with expression arguments.
Takes ownership of the arg1
and args
|
rasqal_world object |
|
list operation |
|
expression to look for in list |
|
sequence of rasqal_expression list arguments |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_string_op_expression (rasqal_world *world
,rasqal_op op
,rasqal_expression *arg1
,rasqal_literal *literal
);
Constructor - create a new expression with one expression and one string operand. Takes ownership of the operands.
The operators are:
RASQAL_EXPR_STR_MATCH
and
RASQAL_EXPR_STR_NMATCH
(unused: formerly for RDQL)
|
rasqal_world object |
|
Expression operator |
|
Operand 1 |
|
Literal operand 2 |
Returns : |
a new rasqal_expression object or NULL on failure |
rasqal_expression * rasqal_new_expression_from_expression
(rasqal_expression *e
);
Copy Constructor - create a new rasqal_expression object from an existing rasqal_expression object.
|
rasqal_expression object to copy or NULL |
Returns : |
a new rasqal_expression object or NULL if e is NULL |
rasqal_expression * rasqal_new_expr_seq_expression (rasqal_world *world
,rasqal_op op
,raptor_sequence *args
);
Constructor - create a new expression with a sequence of expression arguments.
Takes ownership of the args
|
rasqal_world object |
|
expression operation |
|
sequence of rasqal_expression arguments |
Returns : |
a new rasqal_expression object or NULL on failure |
void rasqal_free_expression (rasqal_expression *e
);
Destructor - destroy a rasqal_expression object.
|
rasqal_expression object |
int rasqal_expression_compare (rasqal_expression *e1
,rasqal_expression *e2
,int flags
,int *error_p
);
Compare two expressions
The two literals are compared. The comparison returned is as for strcmp, first before second returns <0. equal returns 0, and first after second returns >0. For URIs, the string value is used for the comparsion.
See rasqal_literal_compare()
for comparison flags.
If error
is not NULL, *error is set to non-0 on error
|
rasqal_expression first expression |
|
rasqal_expression second expression |
|
comparison flags: see rasqal_literal_compare()
|
|
pointer to error |
Returns : |
<0, 0, or >0 as described above. |
rasqal_literal * rasqal_expression_evaluate (rasqal_world *world
,raptor_locator *locator
,rasqal_expression *e
,int flags
);
Evaluate a rasqal_expression tree to give a rasqal_literal result or error.
Deprecated
: use rasqal_expression_evaluate2()
using a rasqal_evaluation_context
|
rasqal_world |
|
error locator (or NULL) |
|
The expression to evaluate. |
|
Flags for rasqal_literal_compare() and RASQAL_COMPARE_NOCASE for string matches. |
Returns : |
a rasqal_literal value or NULL on failure. |
rasqal_literal * rasqal_expression_evaluate2 (rasqal_expression *e
,rasqal_evaluation_context *eval_context
,int *error_p
);
Evaluate a rasqal_expression tree in the context of a rasqal_evaluation_context to give a rasqal_literal result or error.
|
The expression to evaluate. |
|
expression context |
|
pointer to error return flag |
Returns : |
a rasqal_literal value or NULL (a valid value). error_p is set to non-0 on failure. |
const char * rasqal_expression_op_label (rasqal_op op
);
Get a label for the rasqal expression operator
|
the rasqal_expression_op object |
Returns : |
the label (shared string) or NULL if op is out of range or unknown |
int rasqal_expression_print (rasqal_expression *e
,FILE *fh
);
Print a Rasqal expression in a debug format.
The print debug format may change in any release.
|
rasqal_expression object. |
|
The FILE* handle to print to. |
Returns : |
non-0 on failure |
void rasqal_expression_print_op (rasqal_expression *e
,FILE *fh
);
Print a rasqal expression operator in a debug format.
The print debug format may change in any release.
|
the rasqal_expression object |
|
the FILE* handle to print to |
int (*rasqal_expression_visit_fn) (void *user_data
,rasqal_expression *e
);
User function to visit an expression and operate on it with
rasqal_expression_visit()
|
user data passed in with rasqal_expression_visit()
|
|
current expression |
Returns : |
non-0 to truncate the visit |
int rasqal_expression_visit (rasqal_expression *e
,rasqal_expression_visit_fn fn
,void *user_data
);
Visit a user function over a rasqal_expression
If the user function fn
returns non-0, the visit is truncated
and the value is returned.
|
rasqal_expression to visit |
|
visit function |
|
user data to pass to visit function |
Returns : |
non-0 if the visit was truncated. |
rasqal_evaluation_context * rasqal_new_evaluation_context (rasqal_world *world
,raptor_locator *locator
,int flags
);
Constructor - create a rasqal_evaluation_context for use with
rasqal_expression_evaluate2()
|
rasqal world |
|
locator or NULL |
|
expression comparison flags |
Returns : |
non-0 on failure |
void rasqal_free_evaluation_context (rasqal_evaluation_context *eval_context
);
Destructor - destroy a rasqal_evaluation_context object.
|
rasqal_evaluation_context object |
int rasqal_evaluation_context_set_base_uri (rasqal_evaluation_context *eval_context
,raptor_uri *base_uri
);
Set the URI for a rasqal_evaluation_context
|
rasqal_evaluation_context object |
|
base URI |
Returns : |
non-0 on failure |
int rasqal_evaluation_context_set_rand_seed (rasqal_evaluation_context *eval_context
,unsigned int seed
);
Set the random seed for a rasqal_evaluation_context
|
rasqal_evaluation_context object |
|
random seed |
Returns : |
non-0 on failure |