odbx_get_option(3)
π NAME π
okay so this is the tea on odbx_get_option(3) from OpenDBX, bestie: itβs the function that lets you query the backend for implemented options and their current values β¨
π SYNOPSIS π
#include <opendbx/api.h>
int odbx_get_option (odbx_t* handle, unsigned int option, void* value);
πΈ DESCRIPTION πΈ
odbx_get_option() asks the backend module associated to handle by odbx_init() for implemented options and their current values. You can use this function at every stage as long as handle points to a valid connection object π
Its primary use is to find out supported features of the backend module and to enable them with odbx_set_option() before the connection to the database server is established by calling odbx_bind().
The first parameter handle is the connection object created and returned by odbx_init() which becomes invalid as soon as it was supplied to odbx_finish().
π«Ά lowkey important: validhandlenow, invalid afterodbx_finish()β no cap.
There are several option 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 option values by odbx_set_option() to change the behavior of the backend module. The available options are:
ODBX_OPT_API_VERSIONβ the API version implemented by the backend. Currently, it returns only zero and is reserved for the future βODBX_OPT_THREAD_SAFEβ 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 π§΅ODBX_OPT_TLSβ the database client library may support transmitting all data securely by encrypting the network traffic via SSL or TLS πODBX_OPT_MULTI_STATEMENTSβ the database server may be able to support multiple SQL statements in one query string sent viaodbx_query()πODBX_OPT_PAGED_RESULTSβ 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 πODBX_OPT_COMPRESSβ support of compressed network traffic between database client and server. This can lead to higher throughput if the network is the bottleneck πODBX_OPT_MODEβ 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 π
value 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 value parameter by odbx_get_option() will be of boolean nature and therefore is ODBX_ENABLE for a supported option or ODBX_DISABLE for an option which isnβt supported β
π«Ά RETURN VALUE π«Ά
odbx_get_option() returns ODBX_ERR_SUCCESS, 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 fed to odbx_error() and odbx_error_type() to get further details.
π ERRORS π
-ODBX_ERR_PARAMβ one of the supplied parameters is invalid or isNULLand this isnβt allowed in the used backend module or in the native database client library π-ODBX_ERR_OPTIONβ the value passed to theoptionparameter isnβt one of the values listed in this manual. The content ofvalueremains unchanged if this error occurs β οΈ
π¦ SEE ALSO π¦
odbx_bind(), odbx_error(), odbx_error_type(), odbx_init(), odbx_set_option()
π
thatβs the whole page, bestie β brought to you by OpenDBX, dated 6 February 2026, for odbx_get_option(3). mwah π«Ά
π¦ where this page comes from
- ubuntu resolute: libopendbx1-dev 1.4.6-18build2
- ubuntu stonking: libopendbx1-dev 1.4.6-18build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms