Query Results Formatter

Query Results Formatter — Query results formatted into a syntax.

Functions

Types and Values

Description

Variable bindings and boolean query results can be formatted into different syntaxes such as SPARQL Query Results Format or JSON. The rasqal_query_results_formatter class allows choosing a formatter for a particular syntax and writing the syntax to a raptor_iostream which allows turning the syntax into a string, writing to a file handle or other custom destination.

Functions

rasqal_query_results_formats_check ()

int
rasqal_query_results_formats_check (rasqal_world *world,
                                    const char *name,
                                    raptor_uri *uri,
                                    const char *mime_type,
                                    int flags);

rasqal_query_results_formats_check is deprecated and should not be used in newly-written code.

Returns


rasqal_query_results_formats_check2 ()

int
rasqal_query_results_formats_check2 (rasqal_world *world,
                                     const char *name,
                                     raptor_uri *uri,
                                     const char *mime_type,
                                     int flags);

Returns


rasqal_new_query_results_formatter ()

rasqal_query_results_formatter *
rasqal_new_query_results_formatter (rasqal_world *world,
                                    const char *name,
                                    const char *mime_type,
                                    raptor_uri *format_uri);

Returns


rasqal_new_query_results_formatter_for_content ()

rasqal_query_results_formatter *
rasqal_new_query_results_formatter_for_content
                               (rasqal_world *world,
                                raptor_uri *uri,
                                const char *mime_type,
                                const char *buffer,
                                size_t len,
                                const unsigned char *identifier);

Returns


rasqal_free_query_results_formatter ()

void
rasqal_free_query_results_formatter (rasqal_query_results_formatter *formatter);


rasqal_query_results_formatter_read ()

int
rasqal_query_results_formatter_read (rasqal_world *world,
                                     raptor_iostream *iostr,
                                     rasqal_query_results_formatter *formatter,
                                     rasqal_query_results *results,
                                     raptor_uri *base_uri);

Returns


rasqal_query_results_formatter_write ()

int
rasqal_query_results_formatter_write (raptor_iostream *iostr,
                                      rasqal_query_results_formatter *formatter,
                                      rasqal_query_results *results,
                                      raptor_uri *base_uri);

Returns

Types and Values

rasqal_query_results_formatter

rasqal_graph_query_results_formatter* query_results_formatter;

Rasqal query results formatter class.


enum rasqal_query_results_format_flags

Bitflags for rasqal_query_results_formats_check() to find formats with features.

Members

RASQAL_QUERY_RESULTS_FORMAT_FLAG_READER

format can be read.

 

RASQAL_QUERY_RESULTS_FORMAT_FLAG_WRITER

format can be written.