odbx_capabilities(3)

odbx_capabilities(3) β€” OpenDBX manual πŸ’…

okay bestie, welcome to the OpenDBX page for odbx_capabilities(3) β€” yes, the manual name is right there near the top, no cap. This is the function that gives your backend a little vibe check ✨


✨ NAME ✨

odbx_capabilities β€” query implemented capabilities πŸ’…

✨ SYNOPSIS ✨

#include <opendbx/api.h>

int odbx_capabilities (odbx_t* handle, unsigned int cap);

✨ DESCRIPTION ✨

So odbx_capabilities() asks the backend associated with the connection object returned by odbx_init() whether a certain capability set is implemented by that backend. Literally a β€œdo you support this?” check, and the backend answers. 🫢

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. No pressure, but the basic set is mandatory, periodt. This function can be called at any stage after odbx_init() returned successfully. ✨

The first parameter handle has to be the connection object created and returned by odbx_init(). It becomes invalid as soon as it was supplied to odbx_finish(), and odbx_capabilities() will return an error in this case. So don’t be using a finished handle, bestie β€” that’s giving stale connection energy 😭

cap 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 odbx_capabilities() are listed below:

  • -ODBX_CAP_BASIC β€” 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. It’s the bare minimum, the main character of capability sets πŸ‘‘

✨ RETURN VALUE ✨

odbx_capabilities() returns ODBX_ENABLE if the requested capability is supported, ODBX_DISABLE 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 odbx_error() and odbx_error_type() to get further details. Yes, β€œfeed” like that β€” that’s what the page says, and we keep the facts exactly, no editing. πŸ’–

✨ ERRORS ✨

  • -ODBX_ERR_PARAM β€” handle is NULL or the supplied connection object is invalid. Basically the handle didn’t pass the vibe check πŸ™ˆ

✨ SEE ALSO ✨

  • odbx_error()
  • odbx_error_type()
  • odbx_init()

πŸ’– cute sign-off: this page is from the OpenDBX manual, dated 6 February 2026, and it’s the odbx_capabilities(3) page β€” slay, you made it to the end. periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from