![]() |
C Driver API 3.0.0
API for the NuoDB C Driver Library
|
The data structure for executing a SQL statement. More...
#include <statement.h>
Data Fields | |
_NuoDB_Statement_state_t * | _state |
NuoDB_Status(* | addBatch )(NuoDB_Statement *_this) |
Stores the current set of parameter values as a batch entry. | |
const char *(* | analyze )(NuoDB_Statement *_this, int mask) |
Generates table and index statistics for this command. | |
NuoDB_Status(* | clearBatch )(NuoDB_Statement *_this) |
Clear the stored batch entries. | |
NuoDB_Status(* | clearParameters )(NuoDB_Statement *_this) |
Clears the current parameter values immediately. | |
NuoDB_Status(* | close )(NuoDB_Statement *_this) |
Close the statement on the server side. | |
NuoDB_Status(* | execute )(NuoDB_Statement *_this) |
Executes a previously prepared SQL statement. | |
NuoDB_Status(* | executeBatch )(NuoDB_Statement *_this, NuoDB_BatchResult **results, size_t *resultSize) |
Execute the batch operations added via addBatch. | |
NuoDB_Status(* | executeSQL )(NuoDB_Statement *_this, const char *sql, unsigned int flags) |
Executes a non-parameterized SQL statement. | |
NuoDB_Status(* | executeUpdateKeyIndices )(NuoDB_Statement *_this, const char *sql, const int *columnIndices, int count) |
Executes the given SQL statement and places the requested generated keys in the generated keys result set. | |
NuoDB_Status(* | executeUpdateKeyNames )(NuoDB_Statement *_this, const char *sql, char *const *columnNames, int count) |
Executes the given SQL statement and places the requested generated keys in the generated keys result set. | |
NuoDB_Status(* | executeWithFlags )(NuoDB_Statement *_this, unsigned int flags) |
Executes a previously prepared SQL statement. | |
size_t(* | getBatchCount )(NuoDB_Statement *_this) |
Return the number of batch operations added via addBatch. | |
NuoDB_Status(* | getBoolean )(NuoDB_Statement *_this, int index, nuodb_bool_t *boolPtr) |
Retrieves the value of the designated SQL BOOLEAN parameter as a nuodb_bool_t value. | |
NuoDB_Status(* | getByte )(NuoDB_Statement *_this, int index, char *charPtr) |
Retrieves the value of the designated SQL TINYINT parameter as a char value in the C programming language. | |
NuoDB_Connection *(* | getConnection )(NuoDB_Statement *_this) |
Returns the NuoDB_Connection for this statement. | |
NuoDB_Status(* | getDouble )(NuoDB_Statement *_this, int index, double *doublePtr) |
Retrieves the value of the designated SQL DOUBLE parameter as a double value in the C programming language. | |
NuoDB_ResultSet *(* | getGeneratedKeys )(NuoDB_Statement *_this) |
Retrieves any auto-generated keys created as a result of executing this NuoDB_Statement data structure. | |
NuoDB_Status(* | getInt )(NuoDB_Statement *_this, int index, int32_t *intPtr) |
Retrieves the value of the designated SQL INTEGER parameter as an int32_t value in the C programming language. | |
NuoDB_Status(* | getLastStatementTimeMicros )(NuoDB_Statement *_this, int64_t *result) |
Get the server execution time of the last statement executed on the connection. | |
NuoDB_Status(* | getLob )(NuoDB_Statement *_this, int index, NuoDB_Lob_Type lobType, const NuoDB_Lob **lobPtr) |
Retrieves the value of the designated SQL CLOB or BLOB parameter as a NuoDB_Lob data structure. | |
NuoDB_Status(* | getLong )(NuoDB_Statement *_this, int index, int64_t *longPtr) |
Retrieves the value of the designated SQL INTEGER parameter as an int64_t value in the C programming language. | |
NuoDB_ResultSetMetaData *(* | getMetaData )(NuoDB_Statement *_this) |
Retrieves result set metadata as a NuoDB_ResultSetMetaData data structure for a previously prepared statement which has not been executed yet. | |
NuoDB_Status(* | getMoreResults )(NuoDB_Statement *_this, nuodb_bool_t *result) |
Moves to this NuoDB_Statement data structure's next result, returns the new NuoDB_ResultSet and implicitly closes and frees any current NuoDB_ResultSet data structure(s) obtained with the function getResultSet(). | |
NuoDB_Status(* | getParameterMetaData )(NuoDB_Statement *_this, NuoDB_ParameterMetaData **pmdPtr) |
Retrieves the parameter metadata of the last prepared SQL statement. | |
int64_t(* | getQueryTimeout )(NuoDB_Statement *_this) |
Retrieves the number of microseconds the driver will wait for a NuoDB_Statement data structure to execute. | |
NuoDB_ResultSet *(* | getResultSet )(NuoDB_Statement *_this) |
Retrieves the current result as a NuoDB_ResultSet data structure. | |
NuoDB_Status(* | getShort )(NuoDB_Statement *_this, int index, short *shortPtr) |
Retrieves the value of the designated SQL SHORTINT parameter as a short value in the C programming language. | |
NuoDB_Status(* | getString )(NuoDB_Statement *_this, int index, const char **strPtr) |
Retrieves the value of the designated SQL CHAR, VARCHAR, STRING, NUMERIC, DECIMAL or NUMBER parameter as a character string in the C programming language. | |
NuoDB_Status(* | getStringWithLength )(NuoDB_Statement *_this, int index, const char **strPtr, size_t *length) |
Retrieves the value of the designated SQL CHAR, VARCHAR, STRING, BINARY or VARBINARY parameter as a character string in the C programming language. | |
NuoDB_Status(* | getTemporal )(NuoDB_Statement *_this, int index, NuoDB_Temporal_Type temporalType, NuoDB_Temporal **temporalPtr) |
Retrieves the value of the designated SQL DATE, TIME, TIMESTAMP or TIMESTAMP WITHOUT TIME ZONE parameter as a NuoDB_Temporal data structure. | |
int(* | getUpdateCount )(NuoDB_Statement *_this) |
Retrieves the update count. | |
nuodb_bool_t(* | lastExecuteStatus )(NuoDB_Statement *_this) |
returns whether the first result from the last execute call was a result set or not | |
NuoDB_Status(* | prepare )(NuoDB_Statement *_this, const char *sql, unsigned int flags) |
Prepares a parameterized SQL statement. | |
NuoDB_Status(* | prepareUpdateKeyIndices )(NuoDB_Statement *_this, const char *sql, const int *columnIndices, int count) |
Prepare a given DML SQL statement. | |
NuoDB_Status(* | prepareUpdateKeyNames )(NuoDB_Statement *_this, const char *sql, char *const *columnNames, int count) |
Prepare a given DML SQL statement. | |
NuoDB_Status(* | registerOutParameter )(NuoDB_Statement *_this, int index, NuoDB_Type sqlType) |
Registers the OUT parameter in ordinal position index to the sqlType. | |
NuoDB_Status(* | registerOutParameterWithScale )(NuoDB_Statement *_this, int index, NuoDB_Type sqlType, int scale) |
Registers the OUT parameter in ordinal position index to the sqlType. | |
NuoDB_Status(* | setBoolean )(NuoDB_Statement *_this, int index, nuodb_bool_t value) |
Sets the designated parameter to the given boolean value. | |
NuoDB_Status(* | setByte )(NuoDB_Statement *_this, int index, char value) |
Sets the designated parameter to the given char value. | |
NuoDB_Status(* | setBytes )(NuoDB_Statement *_this, int index, const char *stringValue, size_t length) |
Sets the designated parameter to the given binary string value. | |
NuoDB_Status(* | setDouble )(NuoDB_Statement *_this, int index, double value) |
Sets the designated parameter to the given double-precision value. | |
NuoDB_Status(* | setFetchSize )(NuoDB_Statement *_this, int fetchSize) |
Setup of the fetch size. | |
NuoDB_Status(* | setInt )(NuoDB_Statement *_this, int index, int32_t value) |
Sets the designated parameter to the given 32-bit integer value. | |
NuoDB_Status(* | setLob )(NuoDB_Statement *_this, int index, NuoDB_Lob *lob) |
Sets the designated parameter to the given Lob value. | |
NuoDB_Status(* | setLong )(NuoDB_Statement *_this, int index, int64_t value) |
Sets the designated parameter to the given 64-bit integer value. | |
NuoDB_Status(* | setNull )(NuoDB_Statement *_this, int index, int type) |
Sets the designated parameter to SQL NULL. | |
NuoDB_Status(* | setQueryTimeout )(NuoDB_Statement *_this, int64_t microSeconds) |
Sets the number of microseconds the client will wait for a NuoDB_Statement data structure to execute to the given number of microseconds. | |
NuoDB_Status(* | setShort )(NuoDB_Statement *_this, int index, short value) |
Sets the designated parameter to the given short value. | |
NuoDB_Status(* | setString )(NuoDB_Statement *_this, int index, const char *stringValue) |
Sets the designated parameter to the given const char* value. | |
NuoDB_Status(* | setStringWithLength )(NuoDB_Statement *_this, int index, const char *stringValue, size_t length) |
Sets the designated parameter to the given const char* value. | |
NuoDB_Status(* | setTemporal )(NuoDB_Statement *_this, int index, NuoDB_Temporal *timeValue) |
Sets the designated parameter to the given NuoDB_Temporal value. | |
nuodb_bool_t(* | wasNull )(NuoDB_Statement *_this) |
Retrieves whether the last OUT parameter read had the value of SQL NULL. | |
The data structure for executing a SQL statement.
NuoDB_Statement is a data structure used for executing a static SQL statement and returning the results it produces. NuoDB_Statement supports both parameterized and non-parameterized SQL statements.
Only one NuoDB_ResultSet data structure per NuoDB_Statement data structure can be open at the same time. Therefore, if the reading of one NuoDB_ResultSet data structure is interleaved with the reading of another, each must have been generated by different NuoDB_Statement data structures. All execution function in the NuoDB_Statement data structure implicitly close and free a statement's current NuoDB_ResultSet data structure if an open one exists.
A prepared statement may have a NuoDB_ResultSetMetaData data structure if the statement is a query. Only one NuoDB_ResultSetMetaData data structure can be open from a NuoDB_Statement object. The NuoDB_ResultSetMetaData data structure is implicitly closed and freed when the NuoDB_Statement data structure is released.
NuoDB_Status(* NuoDB_Statement::addBatch) (NuoDB_Statement *_this) |
Stores the current set of parameter values as a batch entry.
[in] | _this | a pointer to the current (this) data structure. |
const char *(* NuoDB_Statement::analyze) (NuoDB_Statement *_this, int mask) |
Generates table and index statistics for this command.
For more information about generating index statistics see ANALYZE.
[in] | mask | A bitwise-or of one or both of NUODB_ANALYZESTATEMENT_RECORD and NUODB_ANALYZESTATEMENT_EXECUTION |
NuoDB_Status(* NuoDB_Statement::clearBatch) (NuoDB_Statement *_this) |
Clear the stored batch entries.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::clearParameters) (NuoDB_Statement *_this) |
Clears the current parameter values immediately.
In general, parameter values remain in force for repeated use of a statement. Setting a parameter value automatically removes its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling the function clearParameters().
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::close) (NuoDB_Statement *_this) |
Close the statement on the server side.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::execute) (NuoDB_Statement *_this) |
Executes a previously prepared SQL statement.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::executeBatch) (NuoDB_Statement *_this, NuoDB_BatchResult **results, size_t *resultSize) |
Execute the batch operations added via addBatch.
[in] | _this | a pointer to the current (this) data structure. |
[out] | results | on output, an array of integer holding the result of the corresponding operation |
[out] | resultSize | on output, the length of the array whose pointer has been placed in the results arguments |
NuoDB_Status(* NuoDB_Statement::executeSQL) (NuoDB_Statement *_this, const char *sql, unsigned int flags) |
Executes a non-parameterized SQL statement.
Clients call this function to immediately execute a non-parameterized SQL statement.
[in] | _this | a pointer to the current (this) data structure. |
[in] | sql | a pointer to a const char* that contains the SQL statement string. |
[in] | flags | a set of OR'd NuoDB_Statement_Flags values. Clients can pass a zero to indicate there are no options. Clients can provide the NUODB_AUTOGENERATEDKEYS bitfield to indicate that the statement should return any auto generated keys. Clients can provide the NUODB_EXECUTEQUERY bitfield to optimize statements that are expected to return result sets. Client can provide the NUODB_EXECUTEUPDATE bitfield to optimize statements that are expected to update the database. |
NuoDB_Status(* NuoDB_Statement::executeUpdateKeyIndices) (NuoDB_Statement *_this, const char *sql, const int *columnIndices, int count) |
Executes the given SQL statement and places the requested generated keys in the generated keys result set.
See @getGeneratedKeys for details
[in] | _this | a pointer to the current (this) data structure. |
[in] | sql | query to execute |
[in] | columnIndices | an array of column indexes indicating the columns that should be returned from the inserted row |
[in] | count | the number of entries in the indices array parameter |
NuoDB_Status(* NuoDB_Statement::executeUpdateKeyNames) (NuoDB_Statement *_this, const char *sql, char *const *columnNames, int count) |
Executes the given SQL statement and places the requested generated keys in the generated keys result set.
See @getGeneratedKeys for details
[in] | _this | a pointer to the current (this) data structure. |
[in] | sql | query to execute |
[in] | columnNames | an array of column labels indicating the columns that should be returned from the inserted row |
[in] | count | the number of entries in the columnNames parameter |
NuoDB_Status(* NuoDB_Statement::executeWithFlags) (NuoDB_Statement *_this, unsigned int flags) |
Executes a previously prepared SQL statement.
[in] | _this | a pointer to the current (this) data structure. |
[in] | flags | can be used to overwrite the flags used in prepare |
size_t(* NuoDB_Statement::getBatchCount) (NuoDB_Statement *_this) |
Return the number of batch operations added via addBatch.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::getBoolean) (NuoDB_Statement *_this, int index, nuodb_bool_t *boolPtr) |
Retrieves the value of the designated SQL BOOLEAN parameter as a nuodb_bool_t value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | boolPtr | a pointer to a nuodb_bool_t variable where the parameter value is returned. if the value is SQL NULL, the result is false. |
NuoDB_Status(* NuoDB_Statement::getByte) (NuoDB_Statement *_this, int index, char *charPtr) |
Retrieves the value of the designated SQL TINYINT parameter as a char value in the C programming language.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | charPtr | a pointer to a char variable where the parameter value is returned. if the value is SQL NULL, the result is 0. |
NuoDB_Status(* NuoDB_Statement::getDouble) (NuoDB_Statement *_this, int index, double *doublePtr) |
Retrieves the value of the designated SQL DOUBLE parameter as a double value in the C programming language.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | doublePtr | a pointer to a double variable where the parameter value is returned. if the value is SQL NULL, the result is 0. |
NuoDB_ResultSet *(* NuoDB_Statement::getGeneratedKeys) (NuoDB_Statement *_this) |
Retrieves any auto-generated keys created as a result of executing this NuoDB_Statement data structure.
If this NuoDB_Statement data structure did not generate any keys, an empty NuoDB_ResultSet data structure is returned.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::getInt) (NuoDB_Statement *_this, int index, int32_t *intPtr) |
Retrieves the value of the designated SQL INTEGER parameter as an int32_t value in the C programming language.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | intPtr | a pointer to an int32_t variable where the parameter value is returned. if the value is SQL NULL, the result is 0. |
NuoDB_Status(* NuoDB_Statement::getLastStatementTimeMicros) (NuoDB_Statement *_this, int64_t *result) |
Get the server execution time of the last statement executed on the connection.
[in] | _this | a pointer to the current (this) data structure. |
[out] | result | on output, the execution time in microseconds or -1 if the last statement was a DDL statement |
NuoDB_Status(* NuoDB_Statement::getLob) (NuoDB_Statement *_this, int index, NuoDB_Lob_Type lobType, const NuoDB_Lob **lobPtr) |
Retrieves the value of the designated SQL CLOB or BLOB parameter as a NuoDB_Lob data structure.
The returned NuoDB_Lob is valid only as long as the last executed statement is active in the NuoDB_Statement.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | lobType | the NuoDB_Lob_Type. |
[out] | lobPtr | a pointer to a const NuoDB_Lob* variable where the address of the parameter value held by "_this" data structure is returned. if the value is SQL NULL, the result is NULL. |
NuoDB_Status(* NuoDB_Statement::getLong) (NuoDB_Statement *_this, int index, int64_t *longPtr) |
Retrieves the value of the designated SQL INTEGER parameter as an int64_t value in the C programming language.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | longPtr | a pointer to an int64_t variable where the parameter value is returned. if the value is SQL NULL, the result is 0. |
NuoDB_ResultSetMetaData *(* NuoDB_Statement::getMetaData) (NuoDB_Statement *_this) |
Retrieves result set metadata as a NuoDB_ResultSetMetaData data structure for a previously prepared statement which has not been executed yet.
This function should only be called on a prepared statement before its execution.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::getMoreResults) (NuoDB_Statement *_this, nuodb_bool_t *result) |
Moves to this NuoDB_Statement data structure's next result, returns the new NuoDB_ResultSet and implicitly closes and frees any current NuoDB_ResultSet data structure(s) obtained with the function getResultSet().
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::getParameterMetaData) (NuoDB_Statement *_this, NuoDB_ParameterMetaData **pmdPtr) |
Retrieves the parameter metadata of the last prepared SQL statement.
[in] | _this | a pointer to the current (this) data structure. |
[out] | pmdPtr | a pointer to a NuoDB_ParameterMetaData* variable that points to a data structure held by "_this" data structure. |
The returned NuoDB_ParameterMetaData is valid only as long as the last prepared statement is active in the NuoDB_Statement.
int64_t(* NuoDB_Statement::getQueryTimeout) (NuoDB_Statement *_this) |
Retrieves the number of microseconds the driver will wait for a NuoDB_Statement data structure to execute.
If the limit is exceeded, the execute() function will return an error code code.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_ResultSet *(* NuoDB_Statement::getResultSet) (NuoDB_Statement *_this) |
Retrieves the current result as a NuoDB_ResultSet data structure.
This function should be called only once per result.
[in] | _this | a pointer to the current (this) data structure. |
NuoDB_Status(* NuoDB_Statement::getShort) (NuoDB_Statement *_this, int index, short *shortPtr) |
Retrieves the value of the designated SQL SHORTINT parameter as a short value in the C programming language.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | shortPtr | a pointer to a short variable where the parameter value is returned. if the value is SQL NULL, the result is 0. |
NuoDB_Status(* NuoDB_Statement::getString) (NuoDB_Statement *_this, int index, const char **strPtr) |
Retrieves the value of the designated SQL CHAR, VARCHAR, STRING, NUMERIC, DECIMAL or NUMBER parameter as a character string in the C programming language.
The returned string is valid only as long as the last executed statement is active in the NuoDB_Statement. getString() can only be used with nul terminated strings that do not contain any embedded nul characters. If your application allows strings to have embedded nul characters, or if your strings are not nul terminated, then your client should call getStringWithLength() to retrieve the string buffer and length.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | strPtr | a pointer to a const char* variable where the address of the parameter value held by "_this" data structure is returned. if the value is SQL NULL, the result is NULL. |
NuoDB_Status(* NuoDB_Statement::getStringWithLength) (NuoDB_Statement *_this, int index, const char **strPtr, size_t *length) |
Retrieves the value of the designated SQL CHAR, VARCHAR, STRING, BINARY or VARBINARY parameter as a character string in the C programming language.
The returned string is valid only as long as the last executed statement is active in the NuoDB_Statement.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[out] | strPtr | a pointer to a const char* variable where the address of the parameter value held by "_this" data structure is returned. if the value is SQL NULL, the result is NULL. |
[out] | length | pointer to size_t that holds the length of the string in bytes. |
NuoDB_Status(* NuoDB_Statement::getTemporal) (NuoDB_Statement *_this, int index, NuoDB_Temporal_Type temporalType, NuoDB_Temporal **temporalPtr) |
Retrieves the value of the designated SQL DATE, TIME, TIMESTAMP or TIMESTAMP WITHOUT TIME ZONE parameter as a NuoDB_Temporal data structure.
The caller is expected to free returned NuoDB_Temporal using the NuoDB_Temporal_free() function once finished with it.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | temporalType | the NuoDB_Temporal_Type. |
[out] | temporalPtr | a pointer to a NuoDB_Temporal* variable that points to a data structure allocated by this function. if the value is SQL NULL, the result is NULL. |
int(* NuoDB_Statement::getUpdateCount) (NuoDB_Statement *_this) |
Retrieves the update count.
[in] | _this | a pointer to the current (this) data structure. |
nuodb_bool_t(* NuoDB_Statement::lastExecuteStatus) (NuoDB_Statement *_this) |
returns whether the first result from the last execute call was a result set or not
NuoDB_Status(* NuoDB_Statement::prepare) (NuoDB_Statement *_this, const char *sql, unsigned int flags) |
Prepares a parameterized SQL statement.
[in] | _this | a pointer to the current (this) data structure. |
[in] | sql | a pointer to a const char* that contains a valid, optionally parameterized, SQL statement. |
[in] | flags | a set of OR'd NuoDB_Statement_Flags values. Clients can pass a zero to indicate there are no options. Clients can provided the NUODB_AUTOGENERATEDKEY bitfield to indicate that the statement should return any auto generated keys. Clients can provide the NUODB_EXECUTEQUERY bitfield to optimize statements that are expected to return result sets. Client can provide the NUODB_EXECUTEUPDATE bitfield to optimize statements that are expected to update the database. |
NuoDB_Status(* NuoDB_Statement::prepareUpdateKeyIndices) (NuoDB_Statement *_this, const char *sql, const int *columnIndices, int count) |
Prepare a given DML SQL statement.
On execute, the requested generated keys are placed in the generated keys result set. See @getGeneratedKeys for details
[in] | _this | a pointer to the current (this) data structure. |
[in] | sql | statement to prepare |
[in] | columnIndices | an array of column indices indicating the columns that should be returned from the inserted row |
[in] | count | the number of entries in the indices array parameter |
NuoDB_Status(* NuoDB_Statement::prepareUpdateKeyNames) (NuoDB_Statement *_this, const char *sql, char *const *columnNames, int count) |
Prepare a given DML SQL statement.
On execute, the requested generated keys are placed in the generated keys result set. See @getGeneratedKeys for details
[in] | _this | a pointer to the current (this) data structure. |
[in] | sql | statement to prepare |
[in] | columnNames | an array of column labels indicating the columns that should be returned from the inserted row |
[in] | count | the number of entries in the columnNames parameter |
NuoDB_Status(* NuoDB_Statement::registerOutParameter) (NuoDB_Statement *_this, int index, NuoDB_Type sqlType) |
Registers the OUT parameter in ordinal position index to the sqlType.
All OUT parameters must be registered before a stored procedure is executed.
The type specified by sqlType for an OUT parameter determines the type that must be used in the get method to read the value of that parameter.
[in] | index | parameter index starting with 1 |
[in] | sqlType | the type code defined by NuoDB_Type. |
NuoDB_Status(* NuoDB_Statement::registerOutParameterWithScale) (NuoDB_Statement *_this, int index, NuoDB_Type sqlType, int scale) |
Registers the OUT parameter in ordinal position index to the sqlType.
All OUT parameters must be registered before a stored procedure is executed.
The type specified by sqlType for an OUT parameter determines the type that must be used in the get method to read the value of that parameter.
This version of registerOutParameter should be used when the parameter is of type NUODB_NUMERIC or NUODB_DECIMAL.
[in] | index | parameter index starting with 1 |
[in] | sqlType | the type code defined by NuoDB_Type. |
[in] | scale | the desired number of digits to the right of the decimal point. It must be greater than or equal to zero. |
NuoDB_Status(* NuoDB_Statement::setBoolean) (NuoDB_Statement *_this, int index, nuodb_bool_t value) |
Sets the designated parameter to the given boolean value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the boolean value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setByte) (NuoDB_Statement *_this, int index, char value) |
Sets the designated parameter to the given char value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the one-byte value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setBytes) (NuoDB_Statement *_this, int index, const char *stringValue, size_t length) |
Sets the designated parameter to the given binary string value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | bytes | the value to which we will set the parameter. |
[in] | length | the length of the bytes argument |
NuoDB_Status(* NuoDB_Statement::setDouble) (NuoDB_Statement *_this, int index, double value) |
Sets the designated parameter to the given double-precision value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the double-precision value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setFetchSize) (NuoDB_Statement *_this, int fetchSize) |
Setup of the fetch size.
[in] | _this | a pointer to the current (this) data structure. |
[in] | fetchSize | the value of fetch size |
NuoDB_Status(* NuoDB_Statement::setInt) (NuoDB_Statement *_this, int index, int32_t value) |
Sets the designated parameter to the given 32-bit integer value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the 32-bit integer value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setLob) (NuoDB_Statement *_this, int index, NuoDB_Lob *lob) |
Sets the designated parameter to the given Lob value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the NuoDB_Lob value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setLong) (NuoDB_Statement *_this, int index, int64_t value) |
Sets the designated parameter to the given 64-bit integer value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the 64-bit integer value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setNull) (NuoDB_Statement *_this, int index, int type) |
Sets the designated parameter to SQL NULL.
Note: You must specify the parameter's SQL type.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | type | the type code as defined in NUODB_TYPE_* values. |
NuoDB_Status(* NuoDB_Statement::setQueryTimeout) (NuoDB_Statement *_this, int64_t microSeconds) |
Sets the number of microseconds the client will wait for a NuoDB_Statement data structure to execute to the given number of microseconds.
By default there is no limit on the amount of time allowed for a running statement to complete. If the limit is exceeded, the execute function will return an error code code.
[in] | _this | a pointer to the current (this) data structure. |
[in] | the | new query timeout limit in microseconds; zero means there is no limit. |
NuoDB_Status(* NuoDB_Statement::setShort) (NuoDB_Statement *_this, int index, short value) |
Sets the designated parameter to the given short value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the short value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setString) (NuoDB_Statement *_this, int index, const char *stringValue) |
Sets the designated parameter to the given const char* value.
setString() can only be used with nul terminated strings that do not contain any embedded nul characters. If your application allows strings to have embedded nul characters, or if your strings are not nul terminated, then your client should call setStringWithLength() to explicitly set the length of the stringValue.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | stringValue | the value to which we will set the parameter. |
NuoDB_Status(* NuoDB_Statement::setStringWithLength) (NuoDB_Statement *_this, int index, const char *stringValue, size_t length) |
Sets the designated parameter to the given const char* value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | stringValue | the value to which we will set the parameter. |
[in] | length | the length of the stringValue. |
NuoDB_Status(* NuoDB_Statement::setTemporal) (NuoDB_Statement *_this, int index, NuoDB_Temporal *timeValue) |
Sets the designated parameter to the given NuoDB_Temporal value.
[in] | _this | a pointer to the current (this) data structure. |
[in] | index | the first parameter is 1, the second is 2, ... |
[in] | value | the NuoDB_Temporal value to which we will set the parameter. |
nuodb_bool_t(* NuoDB_Statement::wasNull) (NuoDB_Statement *_this) |
Retrieves whether the last OUT parameter read had the value of SQL NULL.
Note that this method should be called only after calling a getXXX() function; otherwise, there is no value to use in determining whether it is null or not.
[in] | _this | a pointer to the current (this) data structure. |