SQL Relay C API
Functions
sqlrclientwrapper

Functions

SQLRCLIENT_DLLSPEC sqlrcon sqlrcon_alloc (const char *server, uint16_t port, const char *socket, const char *user, const char *password, int32_t retrytime, int32_t tries)
 
SQLRCLIENT_DLLSPEC void sqlrcon_free (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcon_setConnectTimeout (sqlrcon sqlrconref, int32_t timeoutsec, int32_t timeoutusec)
 
SQLRCLIENT_DLLSPEC void sqlrcon_setResponseTimeout (sqlrcon sqlrconref, int32_t timeoutsec, int32_t timeoutusec)
 
SQLRCLIENT_DLLSPEC void sqlrcon_getConnectTimeout (sqlrcon sqlrconref, int32_t *timeoutsec, int32_t *timeoutusec)
 
SQLRCLIENT_DLLSPEC void sqlrcon_getResponseTimeout (sqlrcon sqlrconref, int32_t *timeoutsec, int32_t *timeoutusec)
 
void sqlrcon_setBindVariableDelimiters (sqlrcon sqlrconref, const char *delimiters)
 
int sqlrcon_getBindVariableDelimiterQuestionMarkSupported (sqlrcon sqlrconref)
 
int sqlrcon_getBindVariableDelimiterColonSupported (sqlrcon sqlrconref)
 
int sqlrcon_getBindVariableDelimiterAtSignSupported (sqlrcon sqlrconref)
 
int sqlrcon_getBindVariableDelimiterDollarSignSupported (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcon_enableKerberos (sqlrcon sqlrconref, const char *service, const char *mech, const char *flags)
 
SQLRCLIENT_DLLSPEC void sqlrcon_enableTls (sqlrcon sqlrconref, const char *version, const char *cert, const char *password, const char *ciphers, const char *validate, const char *ca, uint16_t depth)
 
SQLRCLIENT_DLLSPEC void sqlrcon_disableEncryption (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcon_endSession (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_suspendSession (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC uint16_t sqlrcon_getConnectionPort (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_getConnectionSocket (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_resumeSession (sqlrcon sqlrconref, uint16_t port, const char *socket)
 
SQLRCLIENT_DLLSPEC int sqlrcon_ping (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_identify (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_dbVersion (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_dbHostName (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_dbIpAddress (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_serverVersion (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_clientVersion (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_bindFormat (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_nextvalFormat (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_selectDatabase (sqlrcon sqlrconref, const char *database)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_getCurrentDatabase (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC uint64_t sqlrcon_getLastInsertId (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_autoCommitOn (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_autoCommitOff (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_begin (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_commit (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_rollback (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_errorMessage (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int64_t sqlrcon_errorNumber (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcon_debugOn (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcon_debugOff (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC int sqlrcon_getDebug (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcon_debugPrintFunction (sqlrcon sqlrconref, int(*printfunction)(const char *,...))
 
SQLRCLIENT_DLLSPEC void sqlrcon_setDebugFile (sqlrcon sqlrconref, const char *filename)
 
SQLRCLIENT_DLLSPEC void sqlrcon_setClientInfo (sqlrcon sqlrconref, const char *clientinfo)
 
SQLRCLIENT_DLLSPEC const char * sqlrcon_getClientInfo (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC sqlrcur sqlrcur_alloc (sqlrcon sqlrconref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_free (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_setResultSetBufferSize (sqlrcur sqlrcurref, uint64_t rows)
 
SQLRCLIENT_DLLSPEC uint64_t sqlrcur_getResultSetBufferSize (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_dontGetColumnInfo (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_getColumnInfo (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_mixedCaseColumnNames (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_upperCaseColumnNames (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_lowerCaseColumnNames (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_cacheToFile (sqlrcur sqlrcurref, const char *filename)
 
SQLRCLIENT_DLLSPEC void sqlrcur_setCacheTtl (sqlrcur sqlrcurref, uint32_t ttl)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getCacheFileName (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_cacheOff (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getDatabaseList (sqlrcur sqlrcurref, const char *wild)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getTableList (sqlrcur sqlrcurref, const char *wild)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnList (sqlrcur sqlrcurref, const char *table, const char *wild)
 
SQLRCLIENT_DLLSPEC int sqlrcur_sendQuery (sqlrcur sqlrcurref, const char *query)
 
SQLRCLIENT_DLLSPEC int sqlrcur_sendQueryWithLength (sqlrcur sqlrcurref, const char *query, uint32_t length)
 
SQLRCLIENT_DLLSPEC int sqlrcur_sendFileQuery (sqlrcur sqlrcurref, const char *path, const char *filename)
 
SQLRCLIENT_DLLSPEC void sqlrcur_prepareQuery (sqlrcur sqlrcurref, const char *query)
 
SQLRCLIENT_DLLSPEC void sqlrcur_prepareQueryWithLength (sqlrcur sqlrcurref, const char *query, uint32_t length)
 
SQLRCLIENT_DLLSPEC void sqlrcur_prepareFileQuery (sqlrcur sqlrcurref, const char *path, const char *filename)
 
SQLRCLIENT_DLLSPEC void sqlrcur_subString (sqlrcur sqlrcurref, const char *variable, const char *value)
 
SQLRCLIENT_DLLSPEC void sqlrcur_subLong (sqlrcur sqlrcurref, const char *variable, int64_t value)
 
SQLRCLIENT_DLLSPEC void sqlrcur_subDouble (sqlrcur sqlrcurref, const char *variable, double value, uint32_t precision, uint32_t scale)
 
SQLRCLIENT_DLLSPEC void sqlrcur_subStrings (sqlrcur sqlrcurref, const char **variables, const char **values)
 
SQLRCLIENT_DLLSPEC void sqlrcur_subLongs (sqlrcur sqlrcurref, const char **variables, const int64_t *values)
 
SQLRCLIENT_DLLSPEC void sqlrcur_subDoubles (sqlrcur sqlrcurref, const char **variables, const double *values, const uint32_t *precisions, const uint32_t *scales)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindString (sqlrcur sqlrcurref, const char *variable, const char *value)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindStringWithLength (sqlrcur sqlrcurref, const char *variable, const char *value, uint32_t valuelength)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindLong (sqlrcur sqlrcurref, const char *variable, int64_t value)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindDouble (sqlrcur sqlrcurref, const char *variable, double value, uint32_t precision, uint32_t scale)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindBlob (sqlrcur sqlrcurref, const char *variable, const char *value, uint32_t size)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindClob (sqlrcur sqlrcurref, const char *variable, const char *value, uint32_t size)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindStrings (sqlrcur sqlrcurref, const char **variables, const char **values)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindLongs (sqlrcur sqlrcurref, const char **variables, const int64_t *values)
 
SQLRCLIENT_DLLSPEC void sqlrcur_inputBindDoubles (sqlrcur sqlrcurref, const char **variables, const double *values, const uint32_t *precisions, const uint32_t *scales)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindString (sqlrcur sqlrcurref, const char *variable, uint32_t length)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindInteger (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindDouble (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindDate (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindBlob (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindClob (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindCursor (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC void sqlrcur_clearBinds (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC uint16_t sqlrcur_countBindVariables (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_validateBinds (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC int sqlrcur_validBind (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC int sqlrcur_executeQuery (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC int sqlrcur_fetchFromBindCursor (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getOutputBindString (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC int64_t sqlrcur_getOutputBindInteger (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC double sqlrcur_getOutputBindDouble (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getOutputBindDate (sqlrcur sqlrcurref, const char *variable, int16_t *year, int16_t *month, int16_t *day, int16_t *hour, int16_t *minute, int16_t *second, int32_t *microsecond, const char **tz, int *isnegative)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getOutputBindBlob (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getOutputBindClob (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getOutputBindLength (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC sqlrcur sqlrcur_getOutputBindCursor (sqlrcur sqlrcurref, const char *variable)
 
SQLRCLIENT_DLLSPEC int sqlrcur_openCachedResultSet (sqlrcur sqlrcurref, const char *filename)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_colCount (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC uint64_t sqlrcur_rowCount (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC uint64_t sqlrcur_totalRows (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC uint64_t sqlrcur_affectedRows (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC uint64_t sqlrcur_firstRowIndex (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC int sqlrcur_endOfResultSet (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_errorMessage (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC int64_t sqlrcur_errorNumber (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_getNullsAsEmptyStrings (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC void sqlrcur_getNullsAsNulls (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getFieldByIndex (sqlrcur sqlrcurref, uint64_t row, uint32_t col)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getFieldByName (sqlrcur sqlrcurref, uint64_t row, const char *col)
 
SQLRCLIENT_DLLSPEC int64_t sqlrcur_getFieldAsIntegerByIndex (sqlrcur sqlrcurref, uint64_t row, uint32_t col)
 
SQLRCLIENT_DLLSPEC int64_t sqlrcur_getFieldAsIntegerByName (sqlrcur sqlrcurref, uint64_t row, const char *col)
 
SQLRCLIENT_DLLSPEC double sqlrcur_getFieldAsDoubleByIndex (sqlrcur sqlrcurref, uint64_t row, uint32_t col)
 
SQLRCLIENT_DLLSPEC double sqlrcur_getFieldAsDoubleByName (sqlrcur sqlrcurref, uint64_t row, const char *col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getFieldLengthByIndex (sqlrcur sqlrcurref, uint64_t row, uint32_t col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getFieldLengthByName (sqlrcur sqlrcurref, uint64_t row, const char *col)
 
SQLRCLIENT_DLLSPEC const char *const * sqlrcur_getRow (sqlrcur sqlrcurref, uint64_t row)
 
SQLRCLIENT_DLLSPEC uint32_t * sqlrcur_getRowLengths (sqlrcur sqlrcurref, uint64_t row)
 
SQLRCLIENT_DLLSPEC const char *const * sqlrcur_getColumnNames (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getColumnName (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getColumnTypeByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC const char * sqlrcur_getColumnTypeByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnLengthByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnLengthByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnPrecisionByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnPrecisionByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnScaleByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnScaleByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsNullableByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsNullableByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPrimaryKeyByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPrimaryKeyByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUniqueByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUniqueByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPartOfKeyByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPartOfKeyByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUnsignedByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUnsignedByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsZeroFilledByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsZeroFilledByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsBinaryByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsBinaryByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsAutoIncrementByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsAutoIncrementByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getLongestByIndex (sqlrcur sqlrcurref, uint32_t col)
 
SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getLongestByName (sqlrcur sqlrcurref, const char *col)
 
SQLRCLIENT_DLLSPEC void sqlrcur_suspendResultSet (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC uint16_t sqlrcur_getResultSetId (sqlrcur sqlrcurref)
 
SQLRCLIENT_DLLSPEC int sqlrcur_resumeResultSet (sqlrcur sqlrcurref, uint16_t id)
 
SQLRCLIENT_DLLSPEC int sqlrcur_resumeCachedResultSet (sqlrcur sqlrcurref, uint16_t id, const char *filename)
 
SQLRCLIENT_DLLSPEC void sqlrcur_closeResultSet (sqlrcur sqlrcurref)
 

Detailed Description

Function Documentation

◆ sqlrcon_alloc()

SQLRCLIENT_DLLSPEC sqlrcon sqlrcon_alloc ( const char * server,
uint16_t port,
const char * socket,
const char * user,
const char * password,
int32_t retrytime,
int32_t tries )

Initiates a connection to "server" on "port" or to the unix "socket" on the local machine and auths with "user" and "password". Failed connections will be retried for "tries" times, waiting "retrytime" seconds between each try. If "tries" is 0 then retries will continue forever. If "retrytime" is 0 then retries will be attempted on a default interval.

If "server" is a comma-separated list of hosts, then an attempt will be made to connect to each until the attempt succeeds, or there are no more hosts left to try.

If the "socket" parameter is nether NULL nor "" then an attempt will be made to connect through it before attempting to connect to "server" on "port". If it is NULL or "" then no attempt will be made to connect through the socket.

◆ sqlrcon_autoCommitOff()

SQLRCLIENT_DLLSPEC int sqlrcon_autoCommitOff ( sqlrcon sqlrconref)

Instructs the database to wait for the client to tell it when to commit.

◆ sqlrcon_autoCommitOn()

SQLRCLIENT_DLLSPEC int sqlrcon_autoCommitOn ( sqlrcon sqlrconref)

Instructs the database to perform a commit after every successful query.

◆ sqlrcon_begin()

SQLRCLIENT_DLLSPEC int sqlrcon_begin ( sqlrcon sqlrconref)

Begins a transaction. Returns 1 if the begin succeeded, 0 if it failed. If the database automatically begins a new transaction when a commit or rollback is issued then this doesn't do anything unless SQL Relay is faking transaction blocks.

◆ sqlrcon_bindFormat()

SQLRCLIENT_DLLSPEC const char * sqlrcon_bindFormat ( sqlrcon sqlrconref)

Returns a string representing the bind variable format used by the database. For example:

? - database uses a ? to represent a bind variable @* - database uses a @ followed by any characters to represent a bind variable $1 - database uses a $ followed by a number to represent a bind variable :* - database uses a : followed by any characters to represent a bind variable

◆ sqlrcon_clientVersion()

SQLRCLIENT_DLLSPEC const char * sqlrcon_clientVersion ( sqlrcon sqlrconref)

Returns the version of the sqlrelay client software.

◆ sqlrcon_commit()

SQLRCLIENT_DLLSPEC int sqlrcon_commit ( sqlrcon sqlrconref)

Issues a commit. Returns 1 if the commit succeeded, 0 if it failed.

◆ sqlrcon_dbHostName()

SQLRCLIENT_DLLSPEC const char * sqlrcon_dbHostName ( sqlrcon sqlrconref)

Returns the host name of the database

◆ sqlrcon_dbIpAddress()

SQLRCLIENT_DLLSPEC const char * sqlrcon_dbIpAddress ( sqlrcon sqlrconref)

Returns the ip address of the database

◆ sqlrcon_dbVersion()

SQLRCLIENT_DLLSPEC const char * sqlrcon_dbVersion ( sqlrcon sqlrconref)

Returns the version of the database

◆ sqlrcon_debugOff()

SQLRCLIENT_DLLSPEC void sqlrcon_debugOff ( sqlrcon sqlrconref)

Turns debugging off.

◆ sqlrcon_debugOn()

SQLRCLIENT_DLLSPEC void sqlrcon_debugOn ( sqlrcon sqlrconref)

Causes verbose debugging information to be sent to standard output. Another way to do this is to start a query with "-- debug\n". Yet another way is to set the environment variable SQLR_CLIENT_DEBUG to "ON"

◆ sqlrcon_debugPrintFunction()

SQLRCLIENT_DLLSPEC void sqlrcon_debugPrintFunction ( sqlrcon sqlrconref,
int(*)(const char *,...) printfunction )

Allows you to replace the function used to print debug messages with your own function. The function is expected to take arguments like printf.

◆ sqlrcon_disableEncryption()

SQLRCLIENT_DLLSPEC void sqlrcon_disableEncryption ( sqlrcon sqlrconref)

Disables encryption.

◆ sqlrcon_enableKerberos()

SQLRCLIENT_DLLSPEC void sqlrcon_enableKerberos ( sqlrcon sqlrconref,
const char * service,
const char * mech,
const char * flags )

Enables Kerberos authentication and encryption.

"service" indicates the Kerberos service name of the SQL Relay server. If left empty or NULL then the service name "sqlrelay" will be used. "sqlrelay" is the default service name of the SQL Relay server. Note that on Windows platforms the service name must be fully qualified, including the host and realm name. For example: "sqlrelay/sqlrserver.firstworks.com@AD.FIRSTWORKS.COM".

"mech" indicates the specific Kerberos mechanism to use. On Linux/Unix platforms, this should be a string representation of the mechnaism's OID, such as: { 1 2 840 113554 1 2 2 } On Windows platforms, this should be a string like: Kerberos If left empty or NULL then the default mechanism will be used. Only set this if you know that you have a good reason to.

"flags" indicates what Kerberos flags to use. Multiple flags may be specified, separated by commas. If left empty or NULL then a defalt set of flags will be used. Only set this if you know that you have a good reason to.

Valid flags include:

  • GSS_C_MUTUAL_FLAG
  • GSS_C_REPLAY_FLAG
  • GSS_C_SEQUENCE_FLAG
  • GSS_C_CONF_FLAG
  • GSS_C_INTEG_FLAG

For a full list of flags, consult the GSSAPI documentation, though note that only the flags listed above are supported on Windows.

◆ sqlrcon_enableTls()

SQLRCLIENT_DLLSPEC void sqlrcon_enableTls ( sqlrcon sqlrconref,
const char * version,
const char * cert,
const char * password,
const char * ciphers,
const char * validate,
const char * ca,
uint16_t depth )

Enables TLS/SSL encryption, and optionally authentication.

"version" specifies the TLS/SSL protocol version that the client will attempt to use. Valid values include SSL2, SSL3, TLS1, TLS1.1, TLS1.2 or any more recent version of TLS, as supported by and enabled in the underlying TLS/SSL library. If left blank or empty then the highest supported version will be negotiated.

"cert" is the file name of the certificate chain file to send to the SQL Relay server. This is only necessary if the SQL Relay server is configured to authenticate and authorize clients by certificate.

If "cert" contains a password-protected private key, then "password" may be supplied to access it. If the private key is not password-protected, then this argument is ignored, and may be left empty or NULL.

"ciphers" is a list of ciphers to allow. Ciphers may be separated by spaces, commas, or colons. If "ciphers" is empty or NULL then a default set is used. Only set this if you know that you have a good reason to.

For a list of valid ciphers on Linux/Unix platforms, see: man ciphers

For a list of valid ciphers on Windows platforms, see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa375549%28v=vs.85%29.aspx On Windows platforms, the ciphers (alg_id's) should omit CALG_ and may be given with underscores or dashes. For example: 3DES_112

"validate" indicates whether to validate the SQL Relay's server certificate, and may be set to one of the following: "no" - Don't validate the server's certificate. "ca" - Validate that the server's certificate was signed by a trusted certificate authority. "ca+host" - Perform "ca" validation and also validate that one of the subject altenate names (or the common name if no SANs are present) in the certificate matches the host parameter. (Falls back to "ca" validation when a unix socket is used.) "ca+domain" - Perform "ca" validation and also validate that the domain name of one of the subject alternate names (or the common name if no SANs are present) in the certificate matches the domain name of the host parameter. (Falls back to "ca" validation when a unix socket is used.)

"ca" is the location of a certificate authority file to use, in addition to the system's root certificates, when validating the SQL Relay server's certificate. This is useful if the SQL Relay server's certificate is self-signed.

On Windows, "ca" must be a file name.

On non-Windows systems, "ca" can be either a file or directory name. If it is a directory name, then all certificate authority files found in that directory will be used. If it a file name, then only that file will be used.

Note that the supported "cert" and "ca" file formats may vary between platforms. A variety of file formats are generally supported on Linux/Unix platfoms (.pem, .pfx, etc.) but only the .pfx format is currently supported on Windows.

◆ sqlrcon_endSession()

SQLRCLIENT_DLLSPEC void sqlrcon_endSession ( sqlrcon sqlrconref)

Ends the session.

◆ sqlrcon_errorMessage()

SQLRCLIENT_DLLSPEC const char * sqlrcon_errorMessage ( sqlrcon sqlrconref)

If an operation failed and generated an error, the error message is available here. If there is no error then this method returns NULL

◆ sqlrcon_errorNumber()

SQLRCLIENT_DLLSPEC int64_t sqlrcon_errorNumber ( sqlrcon sqlrconref)

If an operation failed and generated an error, the error number is available here. If there is no error then this method returns 0.

◆ sqlrcon_free()

SQLRCLIENT_DLLSPEC void sqlrcon_free ( sqlrcon sqlrconref)

Disconnects and ends the session if it hasn't been terminated already.

◆ sqlrcon_getBindVariableDelimiterAtSignSupported()

int sqlrcon_getBindVariableDelimiterAtSignSupported ( sqlrcon sqlrconref)

Returns true if at-signs (@) are considered to be valid bind variable delimiters.

◆ sqlrcon_getBindVariableDelimiterColonSupported()

int sqlrcon_getBindVariableDelimiterColonSupported ( sqlrcon sqlrconref)

Returns true if colons (:) are considered to be valid bind variable delimiters.

◆ sqlrcon_getBindVariableDelimiterDollarSignSupported()

int sqlrcon_getBindVariableDelimiterDollarSignSupported ( sqlrcon sqlrconref)

Returns true if dollar signs ($) are considered to be valid bind variable delimiters.

◆ sqlrcon_getBindVariableDelimiterQuestionMarkSupported()

int sqlrcon_getBindVariableDelimiterQuestionMarkSupported ( sqlrcon sqlrconref)

Returns true if question marks (?) are considered to be valid bind variable delimiters.

◆ sqlrcon_getClientInfo()

SQLRCLIENT_DLLSPEC const char * sqlrcon_getClientInfo ( sqlrcon sqlrconref)

Returns the string that was set by sqlrcon_setClientInfo().

◆ sqlrcon_getConnectionPort()

SQLRCLIENT_DLLSPEC uint16_t sqlrcon_getConnectionPort ( sqlrcon sqlrconref)

Returns the inet port that the connection is communicating over. This parameter may be passed to another connection for use in the sqlrcon_resumeSession() command. Note: The result this function returns is only valid after a call to suspendSession().

◆ sqlrcon_getConnectionSocket()

SQLRCLIENT_DLLSPEC const char * sqlrcon_getConnectionSocket ( sqlrcon sqlrconref)

Returns the unix socket that the connection is communicating over. This parameter may be passed to another connection for use in the sqlrcon_resumeSession() command. Note: The result this function returns is only valid after a call to suspendSession().

◆ sqlrcon_getConnectTimeout()

SQLRCLIENT_DLLSPEC void sqlrcon_getConnectTimeout ( sqlrcon sqlrconref,
int32_t * timeoutsec,
int32_t * timeoutusec )

Gets the server connect timeout in seconds and microseconds.

◆ sqlrcon_getCurrentDatabase()

SQLRCLIENT_DLLSPEC const char * sqlrcon_getCurrentDatabase ( sqlrcon sqlrconref)

Returns the database/schema that is currently in use.

◆ sqlrcon_getDebug()

SQLRCLIENT_DLLSPEC int sqlrcon_getDebug ( sqlrcon sqlrconref)

Returns 0 if debugging is off and 1 if debugging is on.

◆ sqlrcon_getLastInsertId()

SQLRCLIENT_DLLSPEC uint64_t sqlrcon_getLastInsertId ( sqlrcon sqlrconref)

Returns the value of the autoincrement column for the last insert

◆ sqlrcon_getResponseTimeout()

SQLRCLIENT_DLLSPEC void sqlrcon_getResponseTimeout ( sqlrcon sqlrconref,
int32_t * timeoutsec,
int32_t * timeoutusec )

Gets the response timeout in seconds and microseconds.

◆ sqlrcon_identify()

SQLRCLIENT_DLLSPEC const char * sqlrcon_identify ( sqlrcon sqlrconref)

Returns the type of database: oracle, postgresql, mysql, etc.

◆ sqlrcon_nextvalFormat()

SQLRCLIENT_DLLSPEC const char * sqlrcon_nextvalFormat ( sqlrcon sqlrconref)

Returns a string representing the format of the sequence nextval command used in the database. The format will contain a s in place of the sequence name. For example:

(nextval for s) next value for s nextval('s') s.nextval

Returns an empty string if the database does not support sequences.

◆ sqlrcon_ping()

SQLRCLIENT_DLLSPEC int sqlrcon_ping ( sqlrcon sqlrconref)

Returns 1 if the database is up and 0 if it's down.

◆ sqlrcon_resumeSession()

SQLRCLIENT_DLLSPEC int sqlrcon_resumeSession ( sqlrcon sqlrconref,
uint16_t port,
const char * socket )

Resumes a session previously left open using sqlrcon_suspendSession(). Returns 1 on success and 0 on failure.

◆ sqlrcon_rollback()

SQLRCLIENT_DLLSPEC int sqlrcon_rollback ( sqlrcon sqlrconref)

Issues a rollback. Returns 1 if the rollback succeeded, 0 if it failed.

◆ sqlrcon_selectDatabase()

SQLRCLIENT_DLLSPEC int sqlrcon_selectDatabase ( sqlrcon sqlrconref,
const char * database )

Sets the current database/schema to "database"

◆ sqlrcon_serverVersion()

SQLRCLIENT_DLLSPEC const char * sqlrcon_serverVersion ( sqlrcon sqlrconref)

Returns the version of the sqlrelay server software.

◆ sqlrcon_setBindVariableDelimiters()

void sqlrcon_setBindVariableDelimiters ( sqlrcon sqlrconref,
const char * delimiters )

Sets which delimiters are used to identify bind variables in countBindVariables() and validateBinds(). Valid delimiters include ?,:,@, and $. Defaults to "?:@$"

◆ sqlrcon_setClientInfo()

SQLRCLIENT_DLLSPEC void sqlrcon_setClientInfo ( sqlrcon sqlrconref,
const char * clientinfo )

Allows you to set a string that will be passed to the server and ultimately included in server-side logging along with queries that were run by this instance of the client.

◆ sqlrcon_setConnectTimeout()

SQLRCLIENT_DLLSPEC void sqlrcon_setConnectTimeout ( sqlrcon sqlrconref,
int32_t timeoutsec,
int32_t timeoutusec )

Sets the server connect timeout in seconds and milliseconds. Setting either parameter to -1 disables the timeout. You can also set this timeout using the SQLR_CLIENT_CONNECT_TIMEOUT environment variable.

◆ sqlrcon_setDebugFile()

SQLRCLIENT_DLLSPEC void sqlrcon_setDebugFile ( sqlrcon sqlrconref,
const char * filename )

Allows you to specify a file to write debug to. Setting "filename" to NULL or an empty string causes debug to be written to standard output (the default).

◆ sqlrcon_setResponseTimeout()

SQLRCLIENT_DLLSPEC void sqlrcon_setResponseTimeout ( sqlrcon sqlrconref,
int32_t timeoutsec,
int32_t timeoutusec )

Sets the response timeout (for queries, commits, rollbacks, pings, etc.) in seconds and milliseconds. Setting either parameter to -1 disables the timeout. You can also set this timeout using the SQLR_CLIENT_RESPONSE_TIMEOUT environment variable.

◆ sqlrcon_suspendSession()

SQLRCLIENT_DLLSPEC int sqlrcon_suspendSession ( sqlrcon sqlrconref)

Disconnects this connection from the current session but leaves the session open so that another connection can connect to it using sqlrcon_resumeSession().

◆ sqlrcur_affectedRows()

SQLRCLIENT_DLLSPEC uint64_t sqlrcur_affectedRows ( sqlrcur sqlrcurref)

Returns the number of rows that were updated, inserted or deleted by the query. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. -1 is returned by databases which don't support this option.

◆ sqlrcur_alloc()

SQLRCLIENT_DLLSPEC sqlrcur sqlrcur_alloc ( sqlrcon sqlrconref)

Creates a cursor to run queries and fetch result sets using connection "sqlrconref"

◆ sqlrcur_cacheOff()

SQLRCLIENT_DLLSPEC void sqlrcur_cacheOff ( sqlrcur sqlrcurref)

Sets query caching off.

◆ sqlrcur_cacheToFile()

SQLRCLIENT_DLLSPEC void sqlrcur_cacheToFile ( sqlrcur sqlrcurref,
const char * filename )

Sets query caching on. Future queries will be cached to the file "filename".

A default time-to-live of 10 minutes is also set.

Note that once sqlrcur_cacheToFile() is called, the result sets of all future queries will be cached to that file until another call to sqlrcur_cacheToFile() changes which file to cache to or a call to sqlrcur_cacheOff() turns off caching.

◆ sqlrcur_clearBinds()

SQLRCLIENT_DLLSPEC void sqlrcur_clearBinds ( sqlrcur sqlrcurref)

Clears all bind variables.

◆ sqlrcur_closeResultSet()

SQLRCLIENT_DLLSPEC void sqlrcur_closeResultSet ( sqlrcur sqlrcurref)

Closes the current result set, if one is open. Data that has been fetched already is still available but no more data may be fetched. Server side resources for the result set are freed as well.

◆ sqlrcur_colCount()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_colCount ( sqlrcur sqlrcurref)

Returns the number of columns in the current result set.

◆ sqlrcur_countBindVariables()

SQLRCLIENT_DLLSPEC uint16_t sqlrcur_countBindVariables ( sqlrcur sqlrcurref)

Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.

◆ sqlrcur_defineOutputBindBlob()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindBlob ( sqlrcur sqlrcurref,
const char * variable )

Defines a binary lob output bind variable

◆ sqlrcur_defineOutputBindClob()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindClob ( sqlrcur sqlrcurref,
const char * variable )

Defines a character lob output bind variable

◆ sqlrcur_defineOutputBindCursor()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindCursor ( sqlrcur sqlrcurref,
const char * variable )

Defines a cursor output bind variable

◆ sqlrcur_defineOutputBindDate()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindDate ( sqlrcur sqlrcurref,
const char * variable )

Defines a date output bind variable.

◆ sqlrcur_defineOutputBindDouble()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindDouble ( sqlrcur sqlrcurref,
const char * variable )

Defines an decimal output bind variable.

◆ sqlrcur_defineOutputBindInteger()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindInteger ( sqlrcur sqlrcurref,
const char * variable )

Defines an integer output bind variable.

◆ sqlrcur_defineOutputBindString()

SQLRCLIENT_DLLSPEC void sqlrcur_defineOutputBindString ( sqlrcur sqlrcurref,
const char * variable,
uint32_t length )

Defines a string output bind variable. "length" bytes will be reserved to store the value.

◆ sqlrcur_dontGetColumnInfo()

SQLRCLIENT_DLLSPEC void sqlrcur_dontGetColumnInfo ( sqlrcur sqlrcurref)

Tells the server not to send any column info (names, types, sizes). If you don't need that info, you should call this function to improve performance.

◆ sqlrcur_endOfResultSet()

SQLRCLIENT_DLLSPEC int sqlrcur_endOfResultSet ( sqlrcur sqlrcurref)

Returns 0 if part of the result set is still pending on the server and 1 if not. This function can only return 0 if setResultSetBufferSize() has been called with a parameter other than 0.

◆ sqlrcur_errorMessage()

SQLRCLIENT_DLLSPEC const char * sqlrcur_errorMessage ( sqlrcur sqlrcurref)

If a query failed and generated an error, the error message is available here. If the query succeeded then this function returns a NULL.

◆ sqlrcur_errorNumber()

SQLRCLIENT_DLLSPEC int64_t sqlrcur_errorNumber ( sqlrcur sqlrcurref)

If a query failed and generated an error, the error number is available here. If there is no error then this method returns 0.

◆ sqlrcur_executeQuery()

SQLRCLIENT_DLLSPEC int sqlrcur_executeQuery ( sqlrcur sqlrcurref)

Execute the query that was previously prepared and bound.

◆ sqlrcur_fetchFromBindCursor()

SQLRCLIENT_DLLSPEC int sqlrcur_fetchFromBindCursor ( sqlrcur sqlrcurref)

Fetch from a cursor that was returned as an output bind variable.

◆ sqlrcur_firstRowIndex()

SQLRCLIENT_DLLSPEC uint64_t sqlrcur_firstRowIndex ( sqlrcur sqlrcurref)

Returns the index of the first buffered row. This is useful when buffering only part of the result set at a time.

◆ sqlrcur_free()

SQLRCLIENT_DLLSPEC void sqlrcur_free ( sqlrcur sqlrcurref)

Destroys the cursor and cleans up all associated result set data.

◆ sqlrcur_getCacheFileName()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getCacheFileName ( sqlrcur sqlrcurref)

Returns the name of the file containing the most recently cached result set.

◆ sqlrcur_getColumnInfo()

SQLRCLIENT_DLLSPEC void sqlrcur_getColumnInfo ( sqlrcur sqlrcurref)

Tells the server to send column info.

◆ sqlrcur_getColumnIsAutoIncrementByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsAutoIncrementByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column auto-increments and 0 otherwise.

◆ sqlrcur_getColumnIsAutoIncrementByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsAutoIncrementByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column auto-increments and 0 otherwise.

◆ sqlrcur_getColumnIsBinaryByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsBinaryByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column contains binary data and 0 otherwise.

◆ sqlrcur_getColumnIsBinaryByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsBinaryByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column contains binary data and 0 otherwise.

◆ sqlrcur_getColumnIsNullableByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsNullableByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

◆ sqlrcur_getColumnIsNullableByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsNullableByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column can contain nulls and 0 otherwise.

◆ sqlrcur_getColumnIsPartOfKeyByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPartOfKeyByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column is part of a composite key and 0 otherwise.

◆ sqlrcur_getColumnIsPartOfKeyByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPartOfKeyByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column is part of a composite key and 0 otherwise.

◆ sqlrcur_getColumnIsPrimaryKeyByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPrimaryKeyByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column is a primary key and 0 otherwise.

◆ sqlrcur_getColumnIsPrimaryKeyByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsPrimaryKeyByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column is a primary key and 0 otherwise.

◆ sqlrcur_getColumnIsUniqueByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUniqueByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column is unique and 0 otherwise.

◆ sqlrcur_getColumnIsUniqueByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUniqueByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column is unique and 0 otherwise.

◆ sqlrcur_getColumnIsUnsignedByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUnsignedByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column is an unsigned number and 0 otherwise.

◆ sqlrcur_getColumnIsUnsignedByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsUnsignedByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column is an unsigned number and 0 otherwise.

◆ sqlrcur_getColumnIsZeroFilledByIndex()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsZeroFilledByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns 1 if the specified column was created with the zero-fill flag and 0 otherwise.

◆ sqlrcur_getColumnIsZeroFilledByName()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnIsZeroFilledByName ( sqlrcur sqlrcurref,
const char * col )

Returns 1 if the specified column was created with the zero-fill flag and 0 otherwise.

◆ sqlrcur_getColumnLengthByIndex()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnLengthByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns the length of the specified column.

◆ sqlrcur_getColumnLengthByName()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnLengthByName ( sqlrcur sqlrcurref,
const char * col )

Returns the length of the specified column.

◆ sqlrcur_getColumnList()

SQLRCLIENT_DLLSPEC int sqlrcur_getColumnList ( sqlrcur sqlrcurref,
const char * table,
const char * wild )

Sends a query that returns a list of columns in the table specified by the "table" parameter matching "wild". If wild is empty or NULL then a list of all columns will be returned.

◆ sqlrcur_getColumnName()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getColumnName ( sqlrcur sqlrcurref,
uint32_t col )

Returns the name of the specified column.

◆ sqlrcur_getColumnNames()

SQLRCLIENT_DLLSPEC const char *const * sqlrcur_getColumnNames ( sqlrcur sqlrcurref)

Returns a null terminated array of the column names of the current result set.

◆ sqlrcur_getColumnPrecisionByIndex()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnPrecisionByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

◆ sqlrcur_getColumnPrecisionByName()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnPrecisionByName ( sqlrcur sqlrcurref,
const char * col )

Returns the precision of the specified column. Precision is the total number of digits in a number. eg: 123.45 has a precision of 5. For non-numeric types, it's the number of characters in the string.

◆ sqlrcur_getColumnScaleByIndex()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnScaleByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

◆ sqlrcur_getColumnScaleByName()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getColumnScaleByName ( sqlrcur sqlrcurref,
const char * col )

Returns the scale of the specified column. Scale is the total number of digits to the right of the decimal point in a number. eg: 123.45 has a scale of 2.

◆ sqlrcur_getColumnTypeByIndex()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getColumnTypeByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns the type of the specified column.

◆ sqlrcur_getColumnTypeByName()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getColumnTypeByName ( sqlrcur sqlrcurref,
const char * col )

Returns the type of the specified column.

◆ sqlrcur_getDatabaseList()

SQLRCLIENT_DLLSPEC int sqlrcur_getDatabaseList ( sqlrcur sqlrcurref,
const char * wild )

Sends a query that returns a list of databases/schemas matching "wild". If wild is empty or NULL then a list of all databases/schemas will be returned.

◆ sqlrcur_getFieldAsDoubleByIndex()

SQLRCLIENT_DLLSPEC double sqlrcur_getFieldAsDoubleByIndex ( sqlrcur sqlrcurref,
uint64_t row,
uint32_t col )

Returns the specified field as an decimal.

◆ sqlrcur_getFieldAsDoubleByName()

SQLRCLIENT_DLLSPEC double sqlrcur_getFieldAsDoubleByName ( sqlrcur sqlrcurref,
uint64_t row,
const char * col )

Returns the specified field as an decimal.

◆ sqlrcur_getFieldAsIntegerByIndex()

SQLRCLIENT_DLLSPEC int64_t sqlrcur_getFieldAsIntegerByIndex ( sqlrcur sqlrcurref,
uint64_t row,
uint32_t col )

Returns the specified field as an integer.

◆ sqlrcur_getFieldAsIntegerByName()

SQLRCLIENT_DLLSPEC int64_t sqlrcur_getFieldAsIntegerByName ( sqlrcur sqlrcurref,
uint64_t row,
const char * col )

Returns the specified field as an integer.

◆ sqlrcur_getFieldByIndex()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getFieldByIndex ( sqlrcur sqlrcurref,
uint64_t row,
uint32_t col )

Returns the specified field as a string.

◆ sqlrcur_getFieldByName()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getFieldByName ( sqlrcur sqlrcurref,
uint64_t row,
const char * col )

Returns the specified field as a string.

◆ sqlrcur_getFieldLengthByIndex()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getFieldLengthByIndex ( sqlrcur sqlrcurref,
uint64_t row,
uint32_t col )

Returns the length of the specified row and column.

◆ sqlrcur_getFieldLengthByName()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getFieldLengthByName ( sqlrcur sqlrcurref,
uint64_t row,
const char * col )

Returns the length of the specified row and column.

◆ sqlrcur_getLongestByIndex()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getLongestByIndex ( sqlrcur sqlrcurref,
uint32_t col )

Returns the length of the longest field in the specified column.

◆ sqlrcur_getLongestByName()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getLongestByName ( sqlrcur sqlrcurref,
const char * col )

Returns the length of the longest field in the specified column.

◆ sqlrcur_getNullsAsEmptyStrings()

SQLRCLIENT_DLLSPEC void sqlrcur_getNullsAsEmptyStrings ( sqlrcur sqlrcurref)

Tells the connection to return NULL fields and output bind variables as empty strings. This is the default.

◆ sqlrcur_getNullsAsNulls()

SQLRCLIENT_DLLSPEC void sqlrcur_getNullsAsNulls ( sqlrcur sqlrcurref)

Tells the connection to return NULL fields and output bind variables as NULL's.

◆ sqlrcur_getOutputBindBlob()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getOutputBindBlob ( sqlrcur sqlrcurref,
const char * variable )

Get the value stored in a previously defined binary lob output bind variable.

◆ sqlrcur_getOutputBindClob()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getOutputBindClob ( sqlrcur sqlrcurref,
const char * variable )

Get the value stored in a previously defined character lob output bind variable.

◆ sqlrcur_getOutputBindCursor()

SQLRCLIENT_DLLSPEC sqlrcur sqlrcur_getOutputBindCursor ( sqlrcur sqlrcurref,
const char * variable )

Get the cursor associated with a previously defined output bind variable.

◆ sqlrcur_getOutputBindDate()

SQLRCLIENT_DLLSPEC int sqlrcur_getOutputBindDate ( sqlrcur sqlrcurref,
const char * variable,
int16_t * year,
int16_t * month,
int16_t * day,
int16_t * hour,
int16_t * minute,
int16_t * second,
int32_t * microsecond,
const char ** tz,
int * isnegative )

Get the value stored in a previously defined date output bind variable.

◆ sqlrcur_getOutputBindDouble()

SQLRCLIENT_DLLSPEC double sqlrcur_getOutputBindDouble ( sqlrcur sqlrcurref,
const char * variable )

Get the value stored in a previously defined decimal output bind variable.

◆ sqlrcur_getOutputBindInteger()

SQLRCLIENT_DLLSPEC int64_t sqlrcur_getOutputBindInteger ( sqlrcur sqlrcurref,
const char * variable )

Get the value stored in a previously defined integer output bind variable.

◆ sqlrcur_getOutputBindLength()

SQLRCLIENT_DLLSPEC uint32_t sqlrcur_getOutputBindLength ( sqlrcur sqlrcurref,
const char * variable )

Get the length of the value stored in a previously defined output bind variable.

◆ sqlrcur_getOutputBindString()

SQLRCLIENT_DLLSPEC const char * sqlrcur_getOutputBindString ( sqlrcur sqlrcurref,
const char * variable )

Get the value stored in a previously defined string output bind variable.

◆ sqlrcur_getResultSetBufferSize()

SQLRCLIENT_DLLSPEC uint64_t sqlrcur_getResultSetBufferSize ( sqlrcur sqlrcurref)

Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.

◆ sqlrcur_getResultSetId()

SQLRCLIENT_DLLSPEC uint16_t sqlrcur_getResultSetId ( sqlrcur sqlrcurref)

Returns the internal ID of this result set. This parameter may be passed to another statement for use in the resumeResultSet() function. Note: The value this function returns is only valid after a call to suspendResultSet().

◆ sqlrcur_getRow()

SQLRCLIENT_DLLSPEC const char *const * sqlrcur_getRow ( sqlrcur sqlrcurref,
uint64_t row )

Returns a null terminated array of the values of the fields in the specified row.

◆ sqlrcur_getRowLengths()

SQLRCLIENT_DLLSPEC uint32_t * sqlrcur_getRowLengths ( sqlrcur sqlrcurref,
uint64_t row )

Returns a null terminated array of the lengths of the fields in the specified row.

◆ sqlrcur_getTableList()

SQLRCLIENT_DLLSPEC int sqlrcur_getTableList ( sqlrcur sqlrcurref,
const char * wild )

Sends a query that returns a list of tables matching "wild". If wild is empty or NULL then a list of all tables will be returned.

◆ sqlrcur_inputBindBlob()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindBlob ( sqlrcur sqlrcurref,
const char * variable,
const char * value,
uint32_t size )

Defines a binary lob input bind variable.

◆ sqlrcur_inputBindClob()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindClob ( sqlrcur sqlrcurref,
const char * variable,
const char * value,
uint32_t size )

Defines a character lob input bind variable.

◆ sqlrcur_inputBindDouble()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindDouble ( sqlrcur sqlrcurref,
const char * variable,
double value,
uint32_t precision,
uint32_t scale )

Defines a decimal input bind variable. (If you don't have the precision and scale then set them both to 0. However in that case you may get unexpected rounding behavior if the server is faking binds.)

◆ sqlrcur_inputBindDoubles()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindDoubles ( sqlrcur sqlrcurref,
const char ** variables,
const double * values,
const uint32_t * precisions,
const uint32_t * scales )

Defines an array of decimal input bind variables.

◆ sqlrcur_inputBindLong()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindLong ( sqlrcur sqlrcurref,
const char * variable,
int64_t value )

Defines a integer input bind variable.

◆ sqlrcur_inputBindLongs()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindLongs ( sqlrcur sqlrcurref,
const char ** variables,
const int64_t * values )

Defines an array of integer input bind variables.

◆ sqlrcur_inputBindString()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindString ( sqlrcur sqlrcurref,
const char * variable,
const char * value )

Defines a string input bind variable.

◆ sqlrcur_inputBindStrings()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindStrings ( sqlrcur sqlrcurref,
const char ** variables,
const char ** values )

Defines an array of string input bind variables.

◆ sqlrcur_inputBindStringWithLength()

SQLRCLIENT_DLLSPEC void sqlrcur_inputBindStringWithLength ( sqlrcur sqlrcurref,
const char * variable,
const char * value,
uint32_t valuelength )

Defines a string input bind variable.

◆ sqlrcur_lowerCaseColumnNames()

SQLRCLIENT_DLLSPEC void sqlrcur_lowerCaseColumnNames ( sqlrcur sqlrcurref)

Columns names are converted to lower case.

◆ sqlrcur_mixedCaseColumnNames()

SQLRCLIENT_DLLSPEC void sqlrcur_mixedCaseColumnNames ( sqlrcur sqlrcurref)

Columns names are returned in the same case as they are defined in the database. This is the default.

◆ sqlrcur_openCachedResultSet()

SQLRCLIENT_DLLSPEC int sqlrcur_openCachedResultSet ( sqlrcur sqlrcurref,
const char * filename )

Opens a cached result set. Returns 1 on success and 0 on failure.

◆ sqlrcur_prepareFileQuery()

SQLRCLIENT_DLLSPEC void sqlrcur_prepareFileQuery ( sqlrcur sqlrcurref,
const char * path,
const char * filename )

Prepare to execute the contents of "path"/"filename".

◆ sqlrcur_prepareQuery()

SQLRCLIENT_DLLSPEC void sqlrcur_prepareQuery ( sqlrcur sqlrcurref,
const char * query )

Prepare to execute "query".

◆ sqlrcur_prepareQueryWithLength()

SQLRCLIENT_DLLSPEC void sqlrcur_prepareQueryWithLength ( sqlrcur sqlrcurref,
const char * query,
uint32_t length )

Prepare to execute "query" with length "length". This function must be used if the query contains binary data.

◆ sqlrcur_resumeCachedResultSet()

SQLRCLIENT_DLLSPEC int sqlrcur_resumeCachedResultSet ( sqlrcur sqlrcurref,
uint16_t id,
const char * filename )

Resumes a result set previously left open using suspendSession() and continues caching the result set to "filename". Returns 1 on success and 0 on failure.

◆ sqlrcur_resumeResultSet()

SQLRCLIENT_DLLSPEC int sqlrcur_resumeResultSet ( sqlrcur sqlrcurref,
uint16_t id )

Resumes a result set previously left open using suspendSession(). Returns 1 on success and 0 on failure.

◆ sqlrcur_rowCount()

SQLRCLIENT_DLLSPEC uint64_t sqlrcur_rowCount ( sqlrcur sqlrcurref)

Returns the number of rows in the current result set.

◆ sqlrcur_sendFileQuery()

SQLRCLIENT_DLLSPEC int sqlrcur_sendFileQuery ( sqlrcur sqlrcurref,
const char * path,
const char * filename )

Sends the query in file "path"/"filename" and gets a result set.

◆ sqlrcur_sendQuery()

SQLRCLIENT_DLLSPEC int sqlrcur_sendQuery ( sqlrcur sqlrcurref,
const char * query )

Sends "query" directly and gets a result set.

◆ sqlrcur_sendQueryWithLength()

SQLRCLIENT_DLLSPEC int sqlrcur_sendQueryWithLength ( sqlrcur sqlrcurref,
const char * query,
uint32_t length )

Sends "query" with length "length" directly and gets a result set. This function must be used if the query contains binary data.

◆ sqlrcur_setCacheTtl()

SQLRCLIENT_DLLSPEC void sqlrcur_setCacheTtl ( sqlrcur sqlrcurref,
uint32_t ttl )

Sets the time-to-live for cached result sets. The sqlr-cachemanger will remove each cached result set "ttl" seconds after it's created, provided it's scanning the directory containing the cache files.

◆ sqlrcur_setResultSetBufferSize()

SQLRCLIENT_DLLSPEC void sqlrcur_setResultSetBufferSize ( sqlrcur sqlrcurref,
uint64_t rows )

Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.

◆ sqlrcur_subDouble()

SQLRCLIENT_DLLSPEC void sqlrcur_subDouble ( sqlrcur sqlrcurref,
const char * variable,
double value,
uint32_t precision,
uint32_t scale )

Defines a decimal substitution variable.

◆ sqlrcur_subDoubles()

SQLRCLIENT_DLLSPEC void sqlrcur_subDoubles ( sqlrcur sqlrcurref,
const char ** variables,
const double * values,
const uint32_t * precisions,
const uint32_t * scales )

Defines an array of decmial substitution variables.

◆ sqlrcur_subLong()

SQLRCLIENT_DLLSPEC void sqlrcur_subLong ( sqlrcur sqlrcurref,
const char * variable,
int64_t value )

Defines a integer substitution variable.

◆ sqlrcur_subLongs()

SQLRCLIENT_DLLSPEC void sqlrcur_subLongs ( sqlrcur sqlrcurref,
const char ** variables,
const int64_t * values )

Defines an array of integer substitution variables.

◆ sqlrcur_subString()

SQLRCLIENT_DLLSPEC void sqlrcur_subString ( sqlrcur sqlrcurref,
const char * variable,
const char * value )

Defines a string substitution variable.

◆ sqlrcur_subStrings()

SQLRCLIENT_DLLSPEC void sqlrcur_subStrings ( sqlrcur sqlrcurref,
const char ** variables,
const char ** values )

Defines an array of string substitution variables.

◆ sqlrcur_suspendResultSet()

SQLRCLIENT_DLLSPEC void sqlrcur_suspendResultSet ( sqlrcur sqlrcurref)

Tells the server to leave this result set open when the connection calls suspendSession() so that another connection can connect to it using resumeResultSet() after it calls resumeSession().

◆ sqlrcur_totalRows()

SQLRCLIENT_DLLSPEC uint64_t sqlrcur_totalRows ( sqlrcur sqlrcurref)

Returns the total number of rows that will be returned in the result set. Not all databases support this call. Don't use it for applications which are designed to be portable across databases. -1 is returned by databases which don't support this option.

◆ sqlrcur_upperCaseColumnNames()

SQLRCLIENT_DLLSPEC void sqlrcur_upperCaseColumnNames ( sqlrcur sqlrcurref)

Columns names are converted to upper case.

◆ sqlrcur_validateBinds()

SQLRCLIENT_DLLSPEC void sqlrcur_validateBinds ( sqlrcur sqlrcurref)

If you are binding to any variables that might not actually be in your query, call this to ensure that the database won't try to bind them unless they really are in the query. There is a performance penalty for calling this function

◆ sqlrcur_validBind()

SQLRCLIENT_DLLSPEC int sqlrcur_validBind ( sqlrcur sqlrcurref,
const char * variable )

Returns true if "variable" was a valid bind variable of the query.