11.3. Helper functions to implement a datasource input driver #

11.3.1. Get the parent pointer of a datasource
11.3.2. Get the name of a datasource
11.3.3. Get the input driver pointer of a datasource
11.3.4. Set the private pointer of a datasource
11.3.5. Get the private pointer of a datasource
11.3.6. Allocate a query structure
11.3.7. Get the query name
11.3.8. Get the datasource pointer of a query
11.3.9. Set the private pointer of a query
11.3.10. Get the private pointer of a query
11.3.11. Set current row of a query all NULL
11.3.12. Set a column value of a query

11.3.1. Get the parent pointer of a datasource #

opencreport *
ocrpt_datasource_get_opencreport(const ocrpt_datasource *ds);

11.3.2. Get the name of a datasource #

const char *
ocrpt_datasource_get_name(const ocrpt_datasource *ds);

11.3.3. Get the input driver pointer of a datasource #

const ocrpt_input *
ocrpt_datasource_get_input(const ocrpt_datasource *ds);

11.3.4. Set the private pointer of a datasource #

void
ocrpt_datasource_set_private(ocrpt_datasource *ds,
                             void *priv);

11.3.5. Get the private pointer of a datasource #

void *
ocrpt_datasource_get_private(ocrpt_datasource *ds);

11.3.6. Allocate a query structure #

Allocate a query structure and add the query name.

ocrpt_query *
ocrpt_query_alloc(const ocrpt_datasource *source,
                  const char *name);

11.3.7. Get the query name #

char *
ocrpt_query_get_name(const ocrpt_query *query);

11.3.8. Get the datasource pointer of a query #

ocrpt_datasource *
ocrpt_query_get_source(const ocrpt_query *query);

11.3.9. Set the private pointer of a query #

void
ocrpt_query_set_private(ocrpt_query *query,
                        const void *priv);

11.3.10. Get the private pointer of a query #

void *
ocrpt_query_get_private(const ocrpt_query *query);

11.3.11. Set current row of a query all NULL #

void
ocrpt_query_result_set_values_null(ocrpt_query *q);

11.3.12. Set a column value of a query #

Set the ith column value in the current row of a query. The value can be set to NULL if the isnull parameter is true, or to a valid value using the str and the length parameters.

void
ocrpt_query_result_set_value(ocrpt_query *q,
                             int32_t i,
                             bool isnull,
                             iconv_t conv,
                             const char *str,
                             size_t len);