ec_datasource_set_named_param_mode

March 26, 2020 Contributors

Name

ec_datasource_set_named_param_mode — Initialize a query to use named parameters

Synopsis

#include "modules/datasource/ecdatasource.h"

| (int) **ec_datasource_set_named_param_mode** ( | q, |   |
|   | param_count); |   |

ecdata_cache_query *<var class="pdparam">q</var>;
int<var class="pdparam">param_count</var>;

Description

Initialize a query to use named parameters by setting the params_positional member of the cache to 0.

Note

This function is for use with ‘bind’ variables; the details of how this works depends on the underlying driver being used.

Parameters

q

A pointer to an ecdata_cache_query. The following typedef applies to this data type: typedef struct ec_datasource_cache_query ecdata_cache_query;.

param_count

The number of parameters.

Return Values

On success this function returns 1.

Threading

It is legal to call this function in any thread.

See Also

“ec_datasource_cache_query” and ec_datasource_set_param_by_name