Query backend for implemented options
\*(T<#include <opendbx/api.h>\*(T>
\*(T<int odbx_get_option\*(T> \kx \*(T<(odbx_t* handle, unsigned int option, void* value);\*(T>
\*(T<odbx_get_option\*(T>() asks the backend module associated to \*(T<handle\*(T> by \*(T<odbx_init\*(T>() for implemented options and their current values. This function can be used at every stage as long as \*(T<handle\*(T> points to a valid connection object. Its primary use is to find out supported features of the backend module and to enable them with \*(T<odbx_set_option\*(T>() before the connection to the database server is established by calling \*(T<odbx_bind\*(T>().
The first parameter \*(T<handle\*(T> is the connection object created and returned by \*(T<odbx_init\*(T>() which becomes invalid as soon as it was supplied to \*(T<odbx_finish\*(T>().
There are several \*(T<option\*(T> values defined as named constants in the odbx.h header file. A few of them are for informational purpose only while most of the options can also be set to different \*(T<option\*(T> values by \*(T<odbx_set_option\*(T>() to change the behavior of the backend module. The available options are:
\*(T<ODBX_OPT_API_VERSION\*(T>
The API version implemented by the backend. Currently, it returns only zero and is reserved for the future
\*(T<ODBX_OPT_THREAD_SAFE\*(T>
If it is safe to use this backend and especially the native database client library in an application which uses threads where more than one thread opens database connections via the OpenDBX library
\*(T<ODBX_OPT_TLS\*(T>
The database client library may support transmitting all data securely by encrypting the network traffic via SSL or TLS
\*(T<ODBX_OPT_MULTI_STATEMENTS\*(T>
The database server may be able to support multiple SQL statements in one query string sent via \*(T<odbx_query\*(T>()
\*(T<ODBX_OPT_PAGED_RESULTS\*(T>
All database servers and client libraries are able to transfer the records row by row. Some of them can also transfer multiple rows or even all at once to minimize server load, network traffic and latency. The downside of this is an increased memory consumption
\*(T<ODBX_OPT_COMPRESS\*(T>
Support of compressed network traffic between database client and server. This can lead to higher throughput if the network is the bottleneck
\*(T<ODBX_OPT_MODE\*(T>
Some database servers support different modes of operation, e.g. modes for compliance to other SQL implementations or completely different query languages. This option is available since OpenDBX 1.1.4
\*(T<value\*(T> must be a pointer to an integer variable where the backend module will store the result for the supplied option. If it's not stated otherwise, the value assigned to the \*(T<value\*(T> parameter by \*(T<odbx_get_option\*(T>() will be of boolean nature and therefore is \*(T<ODBX_ENABLE\*(T> for a supported option or \*(T<ODBX_DISABLE\*(T> for an option which isn't supported.
\*(T<odbx_get_option\*(T>() returns \*(T<ODBX_ERR_SUCCESS\*(T>, or an error code whose value is less than zero if one of the operations couldn't be completed successfully. Possible error codes are listed in the error section and they can be feed to \*(T<odbx_error\*(T>() and \*(T<odbx_error_type\*(T>() to get further details.
-\*(T<ODBX_ERR_PARAM\*(T>
One of the supplied parameters is invalid or is NULL and this isn't allowed in the used backend module or in the native database client library
-\*(T<ODBX_ERR_OPTION\*(T>
The value passed to the \*(T<option\*(T> parameter isn't one of the values listed in this manual. The content of \*(T<value\*(T> remains unchanged if this error occurs
\*(T<odbx_bind\*(T>(), \*(T<odbx_error\*(T>(), \*(T<odbx_error_type\*(T>(), \*(T<odbx_init\*(T>(), \*(T<odbx_set_option\*(T>()