C Driver API 3.0.0
API for the NuoDB C Driver Library
Loading...
Searching...
No Matches
NuoDB_Options Struct Reference

Container for NuoDB_Connection options. More...

#include <options.h>

Data Fields

_NuoDB_Options_state_t * _state
 
void(* add )(NuoDB_Options *_this, const char *name, const char *value)
 Add an option to the list of options.
 
void(* clear )(NuoDB_Options *_this)
 Clear the options list.
 
void(* copy )(NuoDB_Options *_this, const NuoDB_Options *src)
 Copy options.
 
int(* getCount )(NuoDB_Options *_this)
 Retrieve a count of the options.
 
const char *(* getValue )(NuoDB_Options *_this, const char *name)
 Retrieve an option value.
 

Detailed Description

Container for NuoDB_Connection options.

NuoDB_Options is a simple container that is used to hold a list of NuoDB_Connection options. Clients should call the NuoDB_Options_create() function to create this container. Clients can add name/value pairs to the NuoDB_Options container and then pass the NuoDB_Options to the NuoDB_Connection::openDatabase() function. Clients should call the NuoDB_Options_free() function to release the container where the client application no longer needs the options.

Field Documentation

◆ add

void(* NuoDB_Options::add) (NuoDB_Options *_this, const char *name, const char *value)

Add an option to the list of options.

Parameters
[in]_thisa pointer to the current "this" data structure.
[in]namea pointer to the option name.
[in]valuea pointer to the option value.

Add the specified name/value pair to the list of options. If the specified name exists in the list, then this function will replace the previous value.

◆ clear

void(* NuoDB_Options::clear) (NuoDB_Options *_this)

Clear the options list.

This function will remove all name/value pairs from the specified NuoDB_Options container.

Parameters
[in]_thisa pointer to the current "this" data structure.

◆ copy

void(* NuoDB_Options::copy) (NuoDB_Options *_this, const NuoDB_Options *src)

Copy options.

This function will copy all of the options from the src container to the current (this) container.

Parameters
[in]_thisa pointer to the current "this" data structure.
[in]srca pointer to the source options.

◆ getCount

int(* NuoDB_Options::getCount) (NuoDB_Options *_this)

Retrieve a count of the options.

This function counts the number of options in the specified NuoDB_Options data structure.

Parameters
[in]_thisa pointer to the current "this" data structure.
Returns
a count of the options or zero (0) if the container is empty.

◆ getValue

const char *(* NuoDB_Options::getValue) (NuoDB_Options *_this, const char *name)

Retrieve an option value.

This function looks for the specified option name. If the option name is found, then this function will return a pointer to the value. If the name is not found, then this function will return a NULL pointer.

Parameters
[in]_thisa pointer to the current "this" data structure.
[in]namea pointer to the option name.
Returns
a pointer to the value or NULL if the value does not exist.

The documentation for this struct was generated from the following file: