rasqal.h   rasqal.h 
skipping to change at line 38 skipping to change at line 38
extern "C" { extern "C" {
#endif #endif
/** /**
* RASQAL_VERSION: * RASQAL_VERSION:
* *
* Rasqal library version number * Rasqal library version number
* *
* Format: major * 10000 + minor * 100 + release * Format: major * 10000 + minor * 100 + release
*/ */
#define RASQAL_VERSION 917 #define RASQAL_VERSION 918
/** /**
* RASQAL_VERSION_STRING: * RASQAL_VERSION_STRING:
* *
* Rasqal library version string * Rasqal library version string
*/ */
#define RASQAL_VERSION_STRING "0.9.17" #define RASQAL_VERSION_STRING "0.9.18"
/** /**
* RASQAL_VERSION_MAJOR: * RASQAL_VERSION_MAJOR:
* *
* Rasqal library major version * Rasqal library major version
*/ */
#define RASQAL_VERSION_MAJOR 0 #define RASQAL_VERSION_MAJOR 0
/** /**
* RASQAL_VERSION_MINOR: * RASQAL_VERSION_MINOR:
* *
* Rasqal library minor version * Rasqal library minor version
*/ */
#define RASQAL_VERSION_MINOR 9 #define RASQAL_VERSION_MINOR 9
/** /**
* RASQAL_VERSION_RELEASE: * RASQAL_VERSION_RELEASE:
* *
* Rasqal library release * Rasqal library release
*/ */
#define RASQAL_VERSION_RELEASE 17 #define RASQAL_VERSION_RELEASE 18
/** /**
* RASQAL_API: * RASQAL_API:
* *
* Macro for wrapping API function call declarations. * Macro for wrapping API function call declarations.
* *
*/ */
#ifndef RASQAL_API #ifndef RASQAL_API
# ifdef WIN32 # ifdef WIN32
# ifdef __GNUC__ # ifdef __GNUC__
skipping to change at line 186 skipping to change at line 186
typedef struct rasqal_literal_s rasqal_literal; typedef struct rasqal_literal_s rasqal_literal;
/** /**
* rasqal_graph_pattern: * rasqal_graph_pattern:
* *
* Rasqal graph pattern class. * Rasqal graph pattern class.
*/ */
typedef struct rasqal_graph_pattern_s rasqal_graph_pattern; typedef struct rasqal_graph_pattern_s rasqal_graph_pattern;
/** /**
* rasqal_variables_table:
*
* Rasqal variables table class.
*/
typedef struct rasqal_variables_table_s rasqal_variables_table;
/**
* rasqal_feature: * rasqal_feature:
* @RASQAL_FEATURE_NO_NET: Deny network requests. * @RASQAL_FEATURE_NO_NET: Deny network requests.
* @RASQAL_FEATURE_LAST: Internal. * @RASQAL_FEATURE_LAST: Internal.
* *
* Query features. * Query features.
* *
* None currently defined. * None currently defined.
*/ */
typedef enum { typedef enum {
RASQAL_FEATURE_NO_NET, RASQAL_FEATURE_NO_NET,
skipping to change at line 239 skipping to change at line 246
* result. * result.
*/ */
typedef enum { typedef enum {
RASQAL_VARIABLE_TYPE_UNKNOWN = 0, RASQAL_VARIABLE_TYPE_UNKNOWN = 0,
RASQAL_VARIABLE_TYPE_NORMAL = 1, RASQAL_VARIABLE_TYPE_NORMAL = 1,
RASQAL_VARIABLE_TYPE_ANONYMOUS = 2 RASQAL_VARIABLE_TYPE_ANONYMOUS = 2
} rasqal_variable_type; } rasqal_variable_type;
/* forward reference */ /* forward reference */
struct rasqal_expression_s; struct rasqal_expression_s;
typedef struct rasqal_variables_table_s rasqal_variables_table;
/** /**
* rasqal_variable: * rasqal_variable:
* @vars_table: variables table that owns this variable * @vars_table: variables table that owns this variable
* @name: Variable name. * @name: Variable name.
* @value: Variable value or NULL if unbound. * @value: Variable value or NULL if unbound.
* @offset: Internal. * @offset: Internal.
* @type: Variable type. * @type: Variable type.
* @expression: Expression when the variable is a computed SELECT expressio n * @expression: Expression when the variable is a computed SELECT expressio n
* @user_data: Pointer to user data associated with a variable. This is no t used by rasqal.
* *
* Binding between a variable name and a value. * Binding between a variable name and a value.
* *
* Includes internal field @offset for recording the offset into the * Includes internal field @offset for recording the offset into the
* (internal) rasqal_query variables array. * (internal) rasqal_query variables array.
*/ */
typedef struct { typedef struct {
rasqal_variables_table* vars_table; rasqal_variables_table* vars_table;
const unsigned char *name; const unsigned char *name;
rasqal_literal* value; rasqal_literal* value;
int offset; int offset;
rasqal_variable_type type; rasqal_variable_type type;
struct rasqal_expression_s* expression; struct rasqal_expression_s* expression;
void *user_data;
} rasqal_variable; } rasqal_variable;
/** /**
* rasqal_data_graph_flags: * rasqal_data_graph_flags:
* @RASQAL_DATA_GRAPH_NONE: Internal. * @RASQAL_DATA_GRAPH_NONE: Internal.
* @RASQAL_DATA_GRAPH_NAMED: Graphs with a source and name. * @RASQAL_DATA_GRAPH_NAMED: Graphs with a source and name.
* @RASQAL_DATA_GRAPH_BACKGROUND: Graphs with a source only. * @RASQAL_DATA_GRAPH_BACKGROUND: Graphs with a source only.
* *
* Flags for the type of #rasqal_data_graph. * Flags for the type of #rasqal_data_graph.
* *
skipping to change at line 284 skipping to change at line 292
typedef enum { typedef enum {
RASQAL_DATA_GRAPH_NONE = 0, RASQAL_DATA_GRAPH_NONE = 0,
RASQAL_DATA_GRAPH_NAMED = 1, RASQAL_DATA_GRAPH_NAMED = 1,
RASQAL_DATA_GRAPH_BACKGROUND = 2, RASQAL_DATA_GRAPH_BACKGROUND = 2,
} rasqal_data_graph_flags; } rasqal_data_graph_flags;
/** /**
* rasqal_data_graph: * rasqal_data_graph:
* @world: rasqal_world object * @world: rasqal_world object
* @uri: source URI * @uri: source URI
* @name_uri: name of graph for %RASQAL_DATA_NAMED * @name_uri: name of graph for %RASQAL_DATA_GRAPH_NAMED
* @flags: %RASQAL_DATA_GRAPH_NAMED or %RASQAL_DATA_GRAPH_BACKGROUND * @flags: %RASQAL_DATA_GRAPH_NAMED or %RASQAL_DATA_GRAPH_BACKGROUND
* *
* A source of RDF data for querying. * A source of RDF data for querying.
* *
* The #uri is the original source (base URI) of the content. It may * The @uri is the original source (base URI) of the content. It may
* also have an additional name @name_uri as long as @flags is * also have an additional name @name_uri as long as @flags is
* %RASQAL_DATA_NAMED * %RASQAL_DATA_GRAPH_NAMED
*/ */
typedef struct { typedef struct {
rasqal_world* world; rasqal_world* world;
raptor_uri* uri; raptor_uri* uri;
raptor_uri* name_uri; raptor_uri* name_uri;
int flags; int flags;
} rasqal_data_graph; } rasqal_data_graph;
/** /**
* rasqal_literal_type: * rasqal_literal_type:
skipping to change at line 368 skipping to change at line 376
RASQAL_LITERAL_PATTERN, RASQAL_LITERAL_PATTERN,
RASQAL_LITERAL_QNAME, RASQAL_LITERAL_QNAME,
RASQAL_LITERAL_VARIABLE, RASQAL_LITERAL_VARIABLE,
/* internal */ /* internal */
RASQAL_LITERAL_LAST= RASQAL_LITERAL_VARIABLE RASQAL_LITERAL_LAST= RASQAL_LITERAL_VARIABLE
} rasqal_literal_type; } rasqal_literal_type;
#define RASQAL_LITERAL_UDT_DEFINED 1 #define RASQAL_LITERAL_UDT_DEFINED 1
/** /**
* rasqal_row:
*
* Rasqal Result Row class.
*/
typedef struct rasqal_row_s rasqal_row;
/**
* rasqal_xsd_decimal: * rasqal_xsd_decimal:
* *
* Rasqal XSD Decimal class. * Rasqal XSD Decimal class.
*/ */
typedef struct rasqal_xsd_decimal_s rasqal_xsd_decimal; typedef struct rasqal_xsd_decimal_s rasqal_xsd_decimal;
/** /**
* rasqal_literal: * rasqal_literal:
* @world: world object pointer * @world: world object pointer
* @usage: Usage count. * @usage: Usage count.
skipping to change at line 613 skipping to change at line 628
typedef unsigned char* (*rasqal_generate_bnodeid_handler)(rasqal_query* que ry, void *user_data, unsigned char *user_bnodeid); typedef unsigned char* (*rasqal_generate_bnodeid_handler)(rasqal_query* que ry, void *user_data, unsigned char *user_bnodeid);
/** /**
* rasqal_query_verb: * rasqal_query_verb:
* @RASQAL_QUERY_VERB_SELECT: RDQL/SPARQL query select verb. * @RASQAL_QUERY_VERB_SELECT: RDQL/SPARQL query select verb.
* @RASQAL_QUERY_VERB_CONSTRUCT: SPARQL query construct verb. * @RASQAL_QUERY_VERB_CONSTRUCT: SPARQL query construct verb.
* @RASQAL_QUERY_VERB_DESCRIBE: SPARQL query describe verb. * @RASQAL_QUERY_VERB_DESCRIBE: SPARQL query describe verb.
* @RASQAL_QUERY_VERB_ASK: SPARQL query ask verb. * @RASQAL_QUERY_VERB_ASK: SPARQL query ask verb.
* @RASQAL_QUERY_VERB_DELETE: LAQRS query delete verb. * @RASQAL_QUERY_VERB_DELETE: LAQRS query delete verb.
* @RASQAL_QUERY_VERB_INSERT: LAQRS query insert verb. * @RASQAL_QUERY_VERB_INSERT: LAQRS query insert verb.
* @RASQAL_QUERY_VERB_UPDATE: SPARQL 1.1 (draft) update operation
* @RASQAL_QUERY_VERB_UNKNOWN: Internal * @RASQAL_QUERY_VERB_UNKNOWN: Internal
* @RASQAL_QUERY_VERB_LAST: Internal * @RASQAL_QUERY_VERB_LAST: Internal
* *
* Query main operation verbs describing the major type of query * Query main operation verbs describing the major type of query
* being performed. * being performed.
*/ */
typedef enum { typedef enum {
/* internal */ /* internal */
RASQAL_QUERY_VERB_UNKNOWN = 0, RASQAL_QUERY_VERB_UNKNOWN = 0,
RASQAL_QUERY_VERB_SELECT = 1, RASQAL_QUERY_VERB_SELECT = 1,
RASQAL_QUERY_VERB_CONSTRUCT = 2, RASQAL_QUERY_VERB_CONSTRUCT = 2,
RASQAL_QUERY_VERB_DESCRIBE = 3, RASQAL_QUERY_VERB_DESCRIBE = 3,
RASQAL_QUERY_VERB_ASK = 4, RASQAL_QUERY_VERB_ASK = 4,
RASQAL_QUERY_VERB_DELETE = 5, RASQAL_QUERY_VERB_DELETE = 5,
RASQAL_QUERY_VERB_INSERT = 6, RASQAL_QUERY_VERB_INSERT = 6,
RASQAL_QUERY_VERB_UPDATE = 7,
/* internal */ /* internal */
RASQAL_QUERY_VERB_LAST=RASQAL_QUERY_VERB_INSERT RASQAL_QUERY_VERB_LAST = RASQAL_QUERY_VERB_UPDATE
} rasqal_query_verb; } rasqal_query_verb;
/** /**
* rasqal_query_results_type:
* @RASQAL_QUERY_RESULTS_BINDINGS: variable binding
* @RASQAL_QUERY_RESULTS_BOOLEAN: a single boolean
* @RASQAL_QUERY_RESULTS_GRAPH: an RDF graph
* @RASQAL_QUERY_RESULTS_SYNTAX: a syntax
*
* Query result type.
*/
typedef enum {
RASQAL_QUERY_RESULTS_BINDINGS,
RASQAL_QUERY_RESULTS_BOOLEAN,
RASQAL_QUERY_RESULTS_GRAPH,
RASQAL_QUERY_RESULTS_SYNTAX
} rasqal_query_results_type;
/**
* rasqal_update_type:
* @RASQAL_UPDATE_TYPE_CLEAR: Clear graph.
* @RASQAL_UPDATE_TYPE_CREATE: Create graph.
* @RASQAL_UPDATE_TYPE_DROP: Drop graph.
* @RASQAL_UPDATE_TYPE_LOAD: Load graph.
* @RASQAL_UPDATE_TYPE_UPDATE: Insert or Delete graph or triples.
* @RASQAL_UPDATE_TYPE_UNKNOWN: Internal
* @RASQAL_UPDATE_TYPE_LAST: Internal
*
* Update type being performed.
*
*/
typedef enum {
/* internal */
RASQAL_UPDATE_TYPE_UNKNOWN = 0,
RASQAL_UPDATE_TYPE_CLEAR = 1,
RASQAL_UPDATE_TYPE_CREATE = 2,
RASQAL_UPDATE_TYPE_DROP = 3,
RASQAL_UPDATE_TYPE_LOAD = 4,
RASQAL_UPDATE_TYPE_UPDATE = 5,
/* internal */
RASQAL_UPDATE_TYPE_LAST = RASQAL_UPDATE_TYPE_UPDATE
} rasqal_update_type;
/**
* rasqal_update_flags:
* @RASQAL_UPDATE_FLAGS_SILENT: the update operation should be silent
* @RASQAL_UPDATE_FLAGS_DATA: the update operation is triple data not templ
ates
*
* Flags for graph update operations
*/
typedef enum {
RASQAL_UPDATE_FLAGS_SILENT = 1,
RASQAL_UPDATE_FLAGS_DATA = 2,
} rasqal_update_flags;
/**
* rasqal_update_operation:
* @type: type of update
* @graph_uri: optional graph URI (clear, drop, load, with ... delete/inser
t)
* @document_uri: optional document URI (load)
* @insert_templates: optional sequence of triple templates to insert
* @delete_templates: optional sequence of triple templates to delete
* @where: optional where template (insert/delete)
* @flags: update flags - bit-or of flags defined in #rasqal_update_flags
*
* Update operation - changing the dataset
*
*/
typedef struct {
rasqal_update_type type;
raptor_uri* graph_uri;
raptor_uri* document_uri;
raptor_sequence* insert_templates;
raptor_sequence* delete_templates;
rasqal_graph_pattern* where;
int flags;
} rasqal_update_operation;
/**
* rasqal_graph_pattern_operator: * rasqal_graph_pattern_operator:
* @RASQAL_GRAPH_PATTERN_OPERATOR_BASIC: Just triple patterns and constrain ts. * @RASQAL_GRAPH_PATTERN_OPERATOR_BASIC: Just triple patterns and constrain ts.
* @RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL: Set of graph patterns (ANDed) a nd constraints. * @RASQAL_GRAPH_PATTERN_OPERATOR_OPTIONAL: Set of graph patterns (ANDed) a nd constraints.
* @RASQAL_GRAPH_PATTERN_OPERATOR_UNION: Set of graph patterns (UNIONed) an d constraints. * @RASQAL_GRAPH_PATTERN_OPERATOR_UNION: Set of graph patterns (UNIONed) an d constraints.
* @RASQAL_GRAPH_PATTERN_OPERATOR_GROUP: Set of graph patterns (ANDed) and constraints. * @RASQAL_GRAPH_PATTERN_OPERATOR_GROUP: Set of graph patterns (ANDed) and constraints.
* @RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH: A graph term + a graph pattern and constraints. * @RASQAL_GRAPH_PATTERN_OPERATOR_GRAPH: A graph term + a graph pattern and constraints.
* @RASQAL_GRAPH_PATTERN_OPERATOR_FILTER: A filter graph pattern with an ex pression * @RASQAL_GRAPH_PATTERN_OPERATOR_FILTER: A filter graph pattern with an ex pression
* @RASQAL_GRAPH_PATTERN_OPERATOR_LET: LET ?var := Expression (LAQRS) * @RASQAL_GRAPH_PATTERN_OPERATOR_LET: LET ?var := Expression (LAQRS)
* @RASQAL_GRAPH_PATTERN_OPERATOR_UNKNOWN: Internal. * @RASQAL_GRAPH_PATTERN_OPERATOR_UNKNOWN: Internal.
* @RASQAL_GRAPH_PATTERN_OPERATOR_LAST: Internal. * @RASQAL_GRAPH_PATTERN_OPERATOR_LAST: Internal.
skipping to change at line 812 skipping to change at line 913
rasqal_expression* rasqal_query_get_group_condition(rasqal_query* query, in t idx); rasqal_expression* rasqal_query_get_group_condition(rasqal_query* query, in t idx);
RASQAL_API RASQAL_API
raptor_sequence* rasqal_query_get_construct_triples_sequence(rasqal_query* query); raptor_sequence* rasqal_query_get_construct_triples_sequence(rasqal_query* query);
RASQAL_API RASQAL_API
rasqal_triple* rasqal_query_get_construct_triple(rasqal_query* query, int i dx); rasqal_triple* rasqal_query_get_construct_triple(rasqal_query* query, int i dx);
RASQAL_API RASQAL_API
void rasqal_query_graph_pattern_visit(rasqal_query* query, rasqal_graph_pat tern_visit_fn visit_fn, void* data); void rasqal_query_graph_pattern_visit(rasqal_query* query, rasqal_graph_pat tern_visit_fn visit_fn, void* data);
RASQAL_API RASQAL_API
int rasqal_query_write(raptor_iostream* iostr, rasqal_query* query, raptor_ uri* format_uri, raptor_uri* base_uri); int rasqal_query_write(raptor_iostream* iostr, rasqal_query* query, raptor_ uri* format_uri, raptor_uri* base_uri);
/* update */
RASQAL_API
raptor_sequence* rasqal_query_get_update_operations_sequence(rasqal_query*
query);
RASQAL_API
rasqal_update_operation* rasqal_query_get_update_operation(rasqal_query* qu
ery, int idx);
/* graph patterns */ /* graph patterns */
RASQAL_API RASQAL_API
rasqal_graph_pattern* rasqal_query_get_query_graph_pattern(rasqal_query* qu ery); rasqal_graph_pattern* rasqal_query_get_query_graph_pattern(rasqal_query* qu ery);
RASQAL_API RASQAL_API
raptor_sequence* rasqal_query_get_graph_pattern_sequence(rasqal_query* quer y); raptor_sequence* rasqal_query_get_graph_pattern_sequence(rasqal_query* quer y);
RASQAL_API RASQAL_API
rasqal_graph_pattern* rasqal_query_get_graph_pattern(rasqal_query* query, i nt idx); rasqal_graph_pattern* rasqal_query_get_graph_pattern(rasqal_query* query, i nt idx);
RASQAL_API RASQAL_API
int rasqal_graph_pattern_add_sub_graph_pattern(rasqal_graph_pattern* graph_ pattern, rasqal_graph_pattern* sub_graph_pattern); int rasqal_graph_pattern_add_sub_graph_pattern(rasqal_graph_pattern* graph_ pattern, rasqal_graph_pattern* sub_graph_pattern);
RASQAL_API RASQAL_API
rasqal_triple* rasqal_graph_pattern_get_triple(rasqal_graph_pattern* graph_ pattern, int idx); rasqal_triple* rasqal_graph_pattern_get_triple(rasqal_graph_pattern* graph_ pattern, int idx);
RASQAL_API RASQAL_API
raptor_sequence* rasqal_graph_pattern_get_sub_graph_pattern_sequence(rasqal _graph_pattern* graph_pattern); raptor_sequence* rasqal_graph_pattern_get_sub_graph_pattern_sequence(rasqal _graph_pattern* graph_pattern);
RASQAL_API RASQAL_API
rasqal_graph_pattern* rasqal_graph_pattern_get_sub_graph_pattern(rasqal_gra ph_pattern* graph_pattern, int idx); rasqal_graph_pattern* rasqal_graph_pattern_get_sub_graph_pattern(rasqal_gra ph_pattern* graph_pattern, int idx);
RASQAL_API RASQAL_API
rasqal_graph_pattern_operator rasqal_graph_pattern_get_operator(rasqal_grap h_pattern* graph_pattern); rasqal_graph_pattern_operator rasqal_graph_pattern_get_operator(rasqal_grap h_pattern* graph_pattern);
RASQAL_API RASQAL_API
const char* rasqal_graph_pattern_operator_as_string(rasqal_graph_pattern_op erator op); const char* rasqal_graph_pattern_operator_as_string(rasqal_graph_pattern_op erator op);
RASQAL_API RASQAL_API
void rasqal_graph_pattern_print(rasqal_graph_pattern* gp, FILE* fh); int rasqal_graph_pattern_print(rasqal_graph_pattern* gp, FILE* fh);
RASQAL_API RASQAL_API
int rasqal_graph_pattern_set_filter_expression(rasqal_graph_pattern* gp, ra sqal_expression* expr); int rasqal_graph_pattern_set_filter_expression(rasqal_graph_pattern* gp, ra sqal_expression* expr);
RASQAL_API RASQAL_API
rasqal_expression* rasqal_graph_pattern_get_filter_expression(rasqal_graph_ pattern* gp); rasqal_expression* rasqal_graph_pattern_get_filter_expression(rasqal_graph_ pattern* gp);
RASQAL_API RASQAL_API
int rasqal_graph_pattern_visit(rasqal_query* query, rasqal_graph_pattern *g p, rasqal_graph_pattern_visit_fn fn, void* user_data); int rasqal_graph_pattern_visit(rasqal_query* query, rasqal_graph_pattern *g p, rasqal_graph_pattern_visit_fn fn, void* user_data);
RASQAL_API RASQAL_API
int rasqal_graph_pattern_get_index(rasqal_graph_pattern* gp); int rasqal_graph_pattern_get_index(rasqal_graph_pattern* gp);
RASQAL_API RASQAL_API
int rasqal_graph_pattern_variable_bound_in(rasqal_graph_pattern *gp, rasqal _variable *v); int rasqal_graph_pattern_variable_bound_in(rasqal_graph_pattern *gp, rasqal _variable *v);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_graph_pattern_get_origin(rasqal_graph_pattern* graph _pattern); rasqal_literal* rasqal_graph_pattern_get_origin(rasqal_graph_pattern* graph _pattern);
/* Utility methods */ /* Utility methods */
RASQAL_API RASQAL_API
const char* rasqal_query_verb_as_string(rasqal_query_verb verb); const char* rasqal_query_verb_as_string(rasqal_query_verb verb);
RASQAL_API RASQAL_API
void rasqal_query_print(rasqal_query* query, FILE* fh); int rasqal_query_print(rasqal_query* query, FILE* fh);
/* Query */ /* Query */
RASQAL_API RASQAL_API
int rasqal_query_prepare(rasqal_query* query, const unsigned char *query_st ring, raptor_uri *base_uri); int rasqal_query_prepare(rasqal_query* query, const unsigned char *query_st ring, raptor_uri *base_uri);
RASQAL_API RASQAL_API
rasqal_query_results* rasqal_query_execute(rasqal_query* query); rasqal_query_results* rasqal_query_execute(rasqal_query* query);
RASQAL_API RASQAL_API
void* rasqal_query_get_user_data(rasqal_query* query); void* rasqal_query_get_user_data(rasqal_query* query);
RASQAL_API RASQAL_API
void rasqal_query_set_user_data(rasqal_query* query, void *user_data); void rasqal_query_set_user_data(rasqal_query* query, void *user_data);
/* query results */ /* query results */
RASQAL_API RASQAL_API
rasqal_query_results* rasqal_new_query_results(rasqal_world* world, rasqal_
query* query, rasqal_query_results_type type, rasqal_variables_table* vars_
table);
RASQAL_API
void rasqal_free_query_results(rasqal_query_results *query_results); void rasqal_free_query_results(rasqal_query_results *query_results);
RASQAL_API RASQAL_API
rasqal_query* rasqal_query_results_get_query(rasqal_query_results* query_re sults); rasqal_query* rasqal_query_results_get_query(rasqal_query_results* query_re sults);
/* Bindings result format */ /* Bindings result format */
RASQAL_API RASQAL_API
int rasqal_query_results_is_bindings(rasqal_query_results *query_results); int rasqal_query_results_is_bindings(rasqal_query_results *query_results);
RASQAL_API RASQAL_API
int rasqal_query_results_get_count(rasqal_query_results *query_results); int rasqal_query_results_get_count(rasqal_query_results *query_results);
skipping to change at line 889 skipping to change at line 998
RASQAL_API RASQAL_API
int rasqal_query_results_get_bindings(rasqal_query_results *query_results, const unsigned char ***names, rasqal_literal ***values); int rasqal_query_results_get_bindings(rasqal_query_results *query_results, const unsigned char ***names, rasqal_literal ***values);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_query_results_get_binding_value(rasqal_query_results *query_results, int offset); rasqal_literal* rasqal_query_results_get_binding_value(rasqal_query_results *query_results, int offset);
RASQAL_API RASQAL_API
const unsigned char* rasqal_query_results_get_binding_name(rasqal_query_res ults *query_results, int offset); const unsigned char* rasqal_query_results_get_binding_name(rasqal_query_res ults *query_results, int offset);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_query_results_get_binding_value_by_name(rasqal_query _results *query_results, const unsigned char *name); rasqal_literal* rasqal_query_results_get_binding_value_by_name(rasqal_query _results *query_results, const unsigned char *name);
RASQAL_API RASQAL_API
int rasqal_query_results_get_bindings_count(rasqal_query_results *query_res ults); int rasqal_query_results_get_bindings_count(rasqal_query_results *query_res ults);
RASQAL_API
int rasqal_query_results_add_row(rasqal_query_results* query_results, rasqa
l_row* row);
/* Boolean result format */ /* Boolean result format */
RASQAL_API RASQAL_API
int rasqal_query_results_is_boolean(rasqal_query_results *query_results); int rasqal_query_results_is_boolean(rasqal_query_results *query_results);
RASQAL_API RASQAL_API
int rasqal_query_results_get_boolean(rasqal_query_results *query_results); int rasqal_query_results_get_boolean(rasqal_query_results *query_results);
/* Graph result format */ /* Graph result format */
RASQAL_API RASQAL_API
int rasqal_query_results_is_graph(rasqal_query_results *query_results); int rasqal_query_results_is_graph(rasqal_query_results *query_results);
RASQAL_API RASQAL_API
raptor_statement* rasqal_query_results_get_triple(rasqal_query_results *que ry_results); raptor_statement* rasqal_query_results_get_triple(rasqal_query_results *que ry_results);
RASQAL_API RASQAL_API
int rasqal_query_results_next_triple(rasqal_query_results *query_results); int rasqal_query_results_next_triple(rasqal_query_results *query_results);
/* Syntax result format */ /* Syntax result format */
RASQAL_API RASQAL_API
int rasqal_query_results_is_syntax(rasqal_query_results* query_results); int rasqal_query_results_is_syntax(rasqal_query_results* query_results);
RASQAL_API RASQAL_API RASQAL_DEPRECATED
int rasqal_query_results_write(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri); int rasqal_query_results_write(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri);
RASQAL_API RASQAL_API
int rasqal_query_results_write2(raptor_iostream *iostr, rasqal_query_result
s *results, const char* name, const char* mime_type, raptor_uri *format_uri
, raptor_uri *base_uri);
RASQAL_API RASQAL_DEPRECATED
int rasqal_query_results_read(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri); int rasqal_query_results_read(raptor_iostream *iostr, rasqal_query_results *results, raptor_uri *format_uri, raptor_uri *base_uri);
RASQAL_API
int rasqal_query_results_read2(raptor_iostream *iostr, rasqal_query_results
*results, const char* name, const char* mime_type, raptor_uri *format_uri,
raptor_uri *base_uri);
/** /**
* RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER: * RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER:
* *
* Flag for rasqal_query_results_formats_enumerate() to get query results f ormats that can be read. * Flag for rasqal_query_results_formats_enumerate() to get query results f ormats that can be read.
*/ */
#define RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER 1 #define RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER 1
/** /**
* RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER: * RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER:
* *
* Flag for rasqal_query_results_formats_enumerate() to get query results f ormats that can be written. * Flag for rasqal_query_results_formats_enumerate() to get query results f ormats that can be written.
*/ */
#define RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER 2 #define RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER 2
RASQAL_API RASQAL_API
int rasqal_query_results_formats_enumerate(rasqal_world* world, unsigned in t counter, const char **name, const char **label, const unsigned char **uri _string, const char **mime_type, int* flags); int rasqal_query_results_formats_enumerate(rasqal_world* world, unsigned in t counter, const char **name, const char **label, const unsigned char **uri _string, const char **mime_type, int* flags);
RASQAL_API RASQAL_API
int rasqal_query_results_formats_check(rasqal_world* world, const char *nam e, raptor_uri* uri, const char *mime_type); int rasqal_query_results_formats_check(rasqal_world* world, const char *nam e, raptor_uri* uri, const char *mime_type);
RASQAL_API RASQAL_API
rasqal_query_results_formatter* rasqal_new_query_results_formatter2(rasqal_
world* world, const char *name, const char *mime_type, raptor_uri* format_u
ri);
RASQAL_API RASQAL_DEPRECATED
rasqal_query_results_formatter* rasqal_new_query_results_formatter(rasqal_w orld* world, const char *name, raptor_uri* format_uri); rasqal_query_results_formatter* rasqal_new_query_results_formatter(rasqal_w orld* world, const char *name, raptor_uri* format_uri);
RASQAL_API RASQAL_API RASQAL_DEPRECATED
rasqal_query_results_formatter* rasqal_new_query_results_formatter_by_mime_ type(rasqal_world* world, const char *mime_type); rasqal_query_results_formatter* rasqal_new_query_results_formatter_by_mime_ type(rasqal_world* world, const char *mime_type);
RASQAL_API RASQAL_API
void rasqal_free_query_results_formatter(rasqal_query_results_formatter* fo rmatter); void rasqal_free_query_results_formatter(rasqal_query_results_formatter* fo rmatter);
RASQAL_API RASQAL_API
int rasqal_query_results_formatter_write(raptor_iostream *iostr, rasqal_que ry_results_formatter* formatter, rasqal_query_results* results, raptor_uri *base_uri); int rasqal_query_results_formatter_write(raptor_iostream *iostr, rasqal_que ry_results_formatter* formatter, rasqal_query_results* results, raptor_uri *base_uri);
RASQAL_API RASQAL_API
int rasqal_query_results_formatter_read(rasqal_world* world, raptor_iostrea m *iostr, rasqal_query_results_formatter* formatter, rasqal_query_results* results, raptor_uri *base_uri); int rasqal_query_results_formatter_read(rasqal_world* world, raptor_iostrea m *iostr, rasqal_query_results_formatter* formatter, rasqal_query_results* results, raptor_uri *base_uri);
RASQAL_API RASQAL_API
const char* rasqal_query_results_formatter_get_mime_type(rasqal_query_resul ts_formatter *formatter); const char* rasqal_query_results_formatter_get_mime_type(rasqal_query_resul ts_formatter *formatter);
skipping to change at line 955 skipping to change at line 1072
int rasqal_query_iostream_write_escaped_counted_string(rasqal_query* query, raptor_iostream* iostr, const unsigned char* string, size_t len); int rasqal_query_iostream_write_escaped_counted_string(rasqal_query* query, raptor_iostream* iostr, const unsigned char* string, size_t len);
RASQAL_API RASQAL_API
unsigned char* rasqal_query_escape_counted_string(rasqal_query* query, cons t unsigned char *string, size_t len, size_t* output_len_p); unsigned char* rasqal_query_escape_counted_string(rasqal_query* query, cons t unsigned char *string, size_t len, size_t* output_len_p);
/* Data graph class */ /* Data graph class */
RASQAL_API RASQAL_API
rasqal_data_graph* rasqal_new_data_graph(rasqal_world* world, raptor_uri* u ri, raptor_uri* name_uri, int flags); rasqal_data_graph* rasqal_new_data_graph(rasqal_world* world, raptor_uri* u ri, raptor_uri* name_uri, int flags);
RASQAL_API RASQAL_API
void rasqal_free_data_graph(rasqal_data_graph* dg); void rasqal_free_data_graph(rasqal_data_graph* dg);
RASQAL_API RASQAL_API
void rasqal_data_graph_print(rasqal_data_graph* dg, FILE* fh); int rasqal_data_graph_print(rasqal_data_graph* dg, FILE* fh);
/** /**
* rasqal_compare_flags: * rasqal_compare_flags:
* @RASQAL_COMPARE_NOCASE: String comparisons are case independent. * @RASQAL_COMPARE_NOCASE: String comparisons are case independent.
* @RASQAL_COMPARE_XQUERY: XQuery comparsion rules apply. * @RASQAL_COMPARE_XQUERY: XQuery comparsion rules apply.
* @RASQAL_COMPARE_RDF: RDF Term comparsion rules apply. * @RASQAL_COMPARE_RDF: RDF Term comparsion rules apply.
* @RASQAL_COMPARE_URI: Allow comparison of URIs and allow strings to ha ve a boolean value (for RDQL) * @RASQAL_COMPARE_URI: Allow comparison of URIs and allow strings to ha ve a boolean value (for RDQL)
* @RASQAL_COMPARE_SAMETERM: SPARQL sameTerm() builtin rules apply. * @RASQAL_COMPARE_SAMETERM: SPARQL sameTerm() builtin rules apply.
* *
* Flags for rasqal_expression_evaluate(), rasqal_literal_compare(), * Flags for rasqal_expression_evaluate(), rasqal_literal_compare(),
skipping to change at line 1004 skipping to change at line 1121
RASQAL_API RASQAL_API
rasqal_expression* rasqal_new_coalesce_expression(rasqal_world* world, rapt or_sequence* args); rasqal_expression* rasqal_new_coalesce_expression(rasqal_world* world, rapt or_sequence* args);
RASQAL_API RASQAL_API
rasqal_expression* rasqal_new_expression_from_expression(rasqal_expression* e); rasqal_expression* rasqal_new_expression_from_expression(rasqal_expression* e);
RASQAL_API RASQAL_API
void rasqal_free_expression(rasqal_expression* e); void rasqal_free_expression(rasqal_expression* e);
RASQAL_API RASQAL_API
void rasqal_expression_print_op(rasqal_expression* e, FILE* fh); void rasqal_expression_print_op(rasqal_expression* e, FILE* fh);
RASQAL_API RASQAL_API
void rasqal_expression_print(rasqal_expression* e, FILE* fh); int rasqal_expression_print(rasqal_expression* e, FILE* fh);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_expression_evaluate(rasqal_world *world, raptor_loca tor *locator, rasqal_expression* e, int flags); rasqal_literal* rasqal_expression_evaluate(rasqal_world *world, raptor_loca tor *locator, rasqal_expression* e, int flags);
/** /**
* rasqal_expression_visit_fn: * rasqal_expression_visit_fn:
* @user_data: user data passed in with rasqal_expression_visit() * @user_data: user data passed in with rasqal_expression_visit()
* @e: current expression * @e: current expression
* *
* User function to visit an expression and operate on it with * User function to visit an expression and operate on it with
* rasqal_expression_visit() * rasqal_expression_visit()
skipping to change at line 1053 skipping to change at line 1170
RASQAL_API RASQAL_API
rasqal_literal* rasqal_new_decimal_literal(rasqal_world* world, const unsig ned char *string); rasqal_literal* rasqal_new_decimal_literal(rasqal_world* world, const unsig ned char *string);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_new_decimal_literal_from_decimal(rasqal_world* world , const unsigned char *string, rasqal_xsd_decimal* decimal); rasqal_literal* rasqal_new_decimal_literal_from_decimal(rasqal_world* world , const unsigned char *string, rasqal_xsd_decimal* decimal);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_new_literal_from_literal(rasqal_literal* l); rasqal_literal* rasqal_new_literal_from_literal(rasqal_literal* l);
RASQAL_API RASQAL_API
void rasqal_free_literal(rasqal_literal* l); void rasqal_free_literal(rasqal_literal* l);
RASQAL_API RASQAL_API
void rasqal_literal_print(rasqal_literal* l, FILE* fh); int rasqal_literal_print(rasqal_literal* l, FILE* fh);
RASQAL_API RASQAL_API
void rasqal_literal_print_type(rasqal_literal* l, FILE* fh); void rasqal_literal_print_type(rasqal_literal* l, FILE* fh);
RASQAL_API RASQAL_API
rasqal_variable* rasqal_literal_as_variable(rasqal_literal* l); rasqal_variable* rasqal_literal_as_variable(rasqal_literal* l);
RASQAL_API RASQAL_API
const unsigned char* rasqal_literal_as_string(rasqal_literal* l); const unsigned char* rasqal_literal_as_string(rasqal_literal* l);
RASQAL_API RASQAL_API
const unsigned char* rasqal_literal_as_string_flags(rasqal_literal* l, int flags, int *error); const unsigned char* rasqal_literal_as_string_flags(rasqal_literal* l, int flags, int *error);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_literal_as_node(rasqal_literal* l); rasqal_literal* rasqal_literal_as_node(rasqal_literal* l);
skipping to change at line 1085 skipping to change at line 1202
RASQAL_API RASQAL_API
rasqal_literal_type rasqal_literal_get_rdf_term_type(rasqal_literal* l); rasqal_literal_type rasqal_literal_get_rdf_term_type(rasqal_literal* l);
RASQAL_API RASQAL_API
int rasqal_literal_is_rdf_literal(rasqal_literal* l); int rasqal_literal_is_rdf_literal(rasqal_literal* l);
RASQAL_API RASQAL_API
rasqal_prefix* rasqal_new_prefix(rasqal_world* world, const unsigned char* prefix, raptor_uri* uri); rasqal_prefix* rasqal_new_prefix(rasqal_world* world, const unsigned char* prefix, raptor_uri* uri);
RASQAL_API RASQAL_API
void rasqal_free_prefix(rasqal_prefix* p); void rasqal_free_prefix(rasqal_prefix* p);
RASQAL_API RASQAL_API
void rasqal_prefix_print(rasqal_prefix* p, FILE* fh); int rasqal_prefix_print(rasqal_prefix* p, FILE* fh);
/* Row class */
rasqal_row* rasqal_new_row_for_size(rasqal_world* world, int size);
void rasqal_free_row(rasqal_row* row);
int rasqal_row_set_value_at(rasqal_row* row, int offset, rasqal_literal* va
lue);
/* Triple class */ /* Triple class */
RASQAL_API RASQAL_API
rasqal_triple* rasqal_new_triple(rasqal_literal* subject, rasqal_literal* p redicate, rasqal_literal* object); rasqal_triple* rasqal_new_triple(rasqal_literal* subject, rasqal_literal* p redicate, rasqal_literal* object);
RASQAL_API RASQAL_API
rasqal_triple* rasqal_new_triple_from_triple(rasqal_triple* t); rasqal_triple* rasqal_new_triple_from_triple(rasqal_triple* t);
RASQAL_API RASQAL_API
void rasqal_free_triple(rasqal_triple* t); void rasqal_free_triple(rasqal_triple* t);
RASQAL_API RASQAL_API
void rasqal_triple_print(rasqal_triple* t, FILE* fh); int rasqal_triple_print(rasqal_triple* t, FILE* fh);
RASQAL_API RASQAL_API
void rasqal_triple_set_origin(rasqal_triple* t, rasqal_literal *l); void rasqal_triple_set_origin(rasqal_triple* t, rasqal_literal *l);
RASQAL_API RASQAL_API
rasqal_literal* rasqal_triple_get_origin(rasqal_triple* t); rasqal_literal* rasqal_triple_get_origin(rasqal_triple* t);
/* Variable class */ /* Variable class */
RASQAL_API RASQAL_API
rasqal_variable* rasqal_new_variable_typed(rasqal_query* rq, rasqal_variabl e_type type, unsigned char *name, rasqal_literal *value); rasqal_variable* rasqal_new_variable_typed(rasqal_query* rq, rasqal_variabl e_type type, unsigned char *name, rasqal_literal *value);
RASQAL_API RASQAL_API
rasqal_variable* rasqal_new_variable(rasqal_query* rq, unsigned char *name, rasqal_literal *value); rasqal_variable* rasqal_new_variable(rasqal_query* rq, unsigned char *name, rasqal_literal *value);
RASQAL_API RASQAL_API
rasqal_variable* rasqal_new_variable_from_variable(rasqal_variable* v); rasqal_variable* rasqal_new_variable_from_variable(rasqal_variable* v);
RASQAL_API RASQAL_API
void rasqal_free_variable(rasqal_variable* v); void rasqal_free_variable(rasqal_variable* v);
RASQAL_API RASQAL_API
void rasqal_variable_print(rasqal_variable* v, FILE* fh); int rasqal_variable_print(rasqal_variable* v, FILE* fh);
RASQAL_API RASQAL_API
void rasqal_variable_set_value(rasqal_variable* v, rasqal_literal* l); void rasqal_variable_set_value(rasqal_variable* v, rasqal_literal* l);
/* Variables Table */
RASQAL_API
rasqal_variables_table* rasqal_new_variables_table(rasqal_world* world);
RASQAL_API
void rasqal_free_variables_table(rasqal_variables_table* vt);
RASQAL_API
rasqal_variable* rasqal_variables_table_add(rasqal_variables_table* vt, ras
qal_variable_type type, const unsigned char *name, rasqal_literal *value);
/* memory functions */ /* memory functions */
RASQAL_API RASQAL_API
void rasqal_free_memory(void *ptr); void rasqal_free_memory(void *ptr);
RASQAL_API RASQAL_API
void* rasqal_alloc_memory(size_t size); void* rasqal_alloc_memory(size_t size);
RASQAL_API RASQAL_API
void* rasqal_calloc_memory(size_t nmemb, size_t size); void* rasqal_calloc_memory(size_t nmemb, size_t size);
/* decimal functions */ /* decimal functions */
RASQAL_API RASQAL_API
 End of changes. 32 change blocks. 
18 lines changed or deleted 163 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/