logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

odbx_finish - Frees connection resources

Description

odbx_finish() is responsible for freeing all resources allocated by odbx_init() and finally may shut down
       the connection to the database server. It must not be invoked before calling odbx_unbind() to avoid memo‐
       ry  leaks  and  open  connection  descriptors on the client and server side which may block necessary re‐
       sources later on.

       The handle parameter has to be the connection object created and returned by odbx_init(). It becomes  in‐
       valid after it was supplied to odbx_finish() for the first time and the function will return an error for
       all further invocations.

Errors

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

Name

       odbx_finish - Frees connection resources

Return Value

odbx_finish()  returns  ODBX_ERR_SUCCESS, or an error code whose value is less than zero if handle is in‐
       valid or one of the operations couldn't be completed successfully by the backend module.  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.

See Also

odbx_error(), odbx_error_type(), odbx_init(), odbx_unbind()

                                                 8 January 2025                                   odbx_finish(3)

Synopsis

       #include <opendbx/api.h>

       int odbx_finish (odbx_t* handle);

See Also