C API  19.3.0
Oracle NoSQL Database C Client
Open and Close

Functions

kv_error_t kv_open_store (kv_store_t **storep, const char *host, int port, const kv_config_t *config)
 Opens a KV Store handle. Call kv_close_store() to release the resources allocated for the kv_store_t structure. More...
 
kv_error_t kv_open_store_with_proxy (kv_store_t **storep, const char *host, int port, const kv_config_t *config, const kv_proxy_config_t *proxy_config)
 Opens a KV Store handle. This call will implicitly start a local proxy server using the specified host and port and proxy configuration information, if one is not already available. Users must call kv_close_store() to release the resources allocated for the kv_store_t structure. More...
 
void kv_close_store (kv_store_t **storep)
 Closes the store, releases all resources used by the handle. More...
 
kv_error_t kv_shutdown_proxy (kv_store_t *store)
 Shutdown the proxy. More...
 

Detailed Description

Function Documentation

void kv_close_store ( kv_store_t **  storep)

Closes the store, releases all resources used by the handle.

Parameters
[in]storep
kv_error_t kv_open_store ( kv_store_t **  storep,
const char *  host,
int  port,
const kv_config_t config 
)

Opens a KV Store handle. Call kv_close_store() to release the resources allocated for the kv_store_t structure.

Note
The config parameter is donated upon success, and so upon a successful open your application should ignore the kv_config_t structure. If this function fails, user must call kv_release_config() to release it.
Parameters
[out]storepThe output store handle, it must be freed using kv_close_store().
[in]hostThe host name of proxy server.
[in]portThe port number of proxy server.
[in]configThe store configuration structure. It is created using kv_create_config().
Returns
KV_SUCCESS if successfully connected to the proxy or an error code if failed.
kv_error_t kv_open_store_with_proxy ( kv_store_t **  storep,
const char *  host,
int  port,
const kv_config_t config,
const kv_proxy_config_t proxy_config 
)

Opens a KV Store handle. This call will implicitly start a local proxy server using the specified host and port and proxy configuration information, if one is not already available. Users must call kv_close_store() to release the resources allocated for the kv_store_t structure.

Note
The config and proxy_config parameters are donated upon success, and so upon a successful open your application should ignore the kv_config_t and kv_proxy_config_t structure. If this function fails, call kv_release_config() to kv_release_proxy_config() to release these structures.
Parameters
[out]storepThe output store handle, it must be freed using kv_close_store().
[in]hostThe host name of proxy server.
[in]portThe port number of proxy server.
[in]configThe store configuration structure. It is created using kv_create_config().
[in]proxy_configThe proxy configuration structure. It is created using kv_create_proxy_config().
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.
kv_error_t kv_shutdown_proxy ( kv_store_t store)

Shutdown the proxy.

Parameters
[in]storeThe store handle
Returns
KV_SUCCESS on success, and an error code (a negative number) on failure.