Difference between revisions of "OpenDBX/C API/odbx capabilities"

From Linuxnetworks
< OpenDBX‎ | C API
Jump to: navigation, search
(Return value)
(header hierarchy)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
 
  '''#include <odbx.h>'''
 
  '''#include <odbx.h>'''
 
   
 
   
Line 7: Line 6:
 
     unsigned int '''cap''' )  
 
     unsigned int '''cap''' )  
  
= Description =
+
== Description ==
  
 
'''odbx_capabilites()''' ask the backend associated to the connection object returned by [[OpenDBX_init|odbx_init()]] 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 [[OpenDBX_init|odbx_init()]] returned successfully.
 
'''odbx_capabilites()''' ask the backend associated to the connection object returned by [[OpenDBX_init|odbx_init()]] 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 [[OpenDBX_init|odbx_init()]] returned successfully.
Line 17: Line 16:
 
; 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.
 
; 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.
  
= Return value =
+
== Return value ==
  
 
'''odbx_capabilities()''' returns one ("1") if the requested capability is supported, zero ("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 [[OpenDBX_error|odbx_error()]] and [[OpenDBX_error_type|odbx_error_type()]] to get further details.
 
'''odbx_capabilities()''' returns one ("1") if the requested capability is supported, zero ("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 [[OpenDBX_error|odbx_error()]] and [[OpenDBX_error_type|odbx_error_type()]] to get further details.
  
= Errors =
+
== Errors ==
  
 
; -ODBX_ERR_PARAM : '''handle''' is NULL or the supplied connection object is invalid
 
; -ODBX_ERR_PARAM : '''handle''' is NULL or the supplied connection object is invalid
  
= See also =
+
== See also ==
  
 
* [[OpenDBX_error]]
 
* [[OpenDBX_error]]

Revision as of 18:31, 6 May 2007

#include <odbx.h>

int odbx_capabilities(
    odbx_t* handle,
    unsigned int cap ) 

Description

odbx_capabilites() ask the backend associated to the connection object returned by odbx_init() 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 odbx_init() returned successfully.

The first parameter handle have 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.

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.

Return value

odbx_capabilities() returns one ("1") if the requested capability is supported, zero ("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 odbx_error() and odbx_error_type() to get further details.

Errors

-ODBX_ERR_PARAM 
handle is NULL or the supplied connection object is invalid

See also



Back to Overview