odbx_capabilities(3)

NAME
odbx_capabilities - Query implemented capabilities

SYNOPSIS
\FC#include <opendbx/api.h>\F[]

\FCint odbx_capabilities\F[]
\FC(odbx_t* handle, unsigned int cap);\F[]

DESCRIPTION
\FCodbx_capabilities\F[]() ask the backend associated to the connection object returned by \FCodbx_init\F[]() if a certain capability set is implemented by this backend. All backends have to implement the basic capability set and may implement further predefined functional sets if they are supported by the native database client library. This function can be called at any stage after \FCodbx_init\F[]() returned successfully.

The first parameter \FChandle\F[] has to be the connection object created and returned by \FCodbx_init\F[](). It becomes invalid as soon as it was supplied to \FCodbx_finish\F[]() and \FCodbx_capabilities\F[]() will return an error in this case.

\FCcap\F[] is the number of the capability set as defined by macro constants in odbx.h. Valid constant names which can be supplied as second parameter to \FCodbx_capabilities\F[]() are listed below:

-\FCODBX_CAP_BASIC\F[]
    The core function set which have to be implemented by all backends. It consists of all functions necessary to connect to, send textual queries to and process simple results returned from the database server as well as error handling functions.

RETURN VALUE
\FCodbx_capabilities\F[]() returns \FCODBX_ENABLE\F[] if the requested capability is supported, \FCODBX_DISABLE\F[] if the capability is not supported or an error code whose value is less than zero if one of the supplied parameters is invalid. Possible error codes are listed in the error section and they can be feed to \FCodbx_error\F[]() and \FCodbx_error_type\F[]() to get further details.

ERRORS

-\FCODBX_ERR_PARAM\F[]
    \FChandle\F[] is NULL or the supplied connection object is invalid

SEE ALSO
\FCodbx_error\F[](), \FCodbx_error_type\F[](), \FCodbx_init\F[]()