Reference

odbx_capabilities(3)

Query implemented capabilities

NAME

odbx_capabilities - Query implemented capabilities

SYNOPSIS

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

FCint odbx_capabilitiesF[0] FC(odbx_t* handle, unsigned int cap);F[0]

DESCRIPTION

FCodbx_capabilitiesF[0]() ask the backend associated to the connection object returned by FCodbx_initF[0]() 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_initF[0]() returned successfully.

The first parameter FChandleF[0] has to be the connection object created and returned by FCodbx_initF[0](). It becomes invalid as soon as it was supplied to FCodbx_finishF[0]() and FCodbx_capabilitiesF[0]() will return an error in this case.

FCcapF[0] 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_capabilitiesF[0]() are listed below:

-FCODBX_CAP_BASICF[0]

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_capabilitiesF[0]() returns FCODBX_ENABLEF[0] if the requested capability is supported, FCODBX_DISABLEF[0] 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_errorF[0]() and FCodbx_error_typeF[0]() to get further details.

ERRORS

-FCODBX_ERR_PARAMF[0]

FChandleF[0] is NULL or the supplied connection object is invalid

SEE ALSO

FCodbx_errorF[0](), FCodbx_error_typeF[0](), FCodbx_initF[0]()

History