SQLAPI++ C interface functions. More...
Functions | |
| SAException * | sqlapi_alloc_error () |
| Allocates the Library error handle. More... | |
| void | sqlapi_free_error (SAException **perr) |
| Releases all error handle related resources. More... | |
| SAString * | sqlapi_error_text (const SAException *err) |
| Gets the SAException error text. More... | |
| const SAChar * | sqlapi_error_message (const SAException *err) |
| Gets the SAException error message. More... | |
| int | sqlapi_error_native_code (const SAException *err) |
| Gets the SAException error native code. More... | |
| int | sqlapi_error_pos (const SAException *err) |
| Gets the SAException error position. More... | |
| SAErrorClass_t | sqlapi_error_class (const SAException *err) |
| Gets the SAException error class. More... | |
| const SAException * | sqlapi_error_nested (const SAException *err) |
| Gets the SAException nested error. More... | |
| SABool_t | sqlapi_has_error (const SAException *err) |
| Checks if SAException handle contains DBMS error information. | |
| SAPI * | sqlapi_alloc_api () |
| Allocates new API handle. More... | |
| void | sqlapi_free_api (SAPI **papi) |
| Releases all API handle related resources. More... | |
| void | sqlapi_set_api_option (SAPI *api, const SAChar *szOption, const SAChar *szValue) |
| Sets SAPI handle option. More... | |
| SAErrorClass_t | sqlapi_init (SAPI *api, SAClient_t type, SAException *err) |
| Initializes SAPI handle with specified DBMS client type. More... | |
| SAConnection * | sqlapi_alloc_connection (SAPI *api) |
| Allocates new connection handle. More... | |
| void | sqlapi_free_connection (SAConnection **pcon) |
| Releases all connection handle related resources. More... | |
| void | sqlapi_set_connection_option (SAConnection *conn, const SAChar *szOption, const SAChar *szValue) |
| Sets SAConnection handle option. More... | |
| SAErrorClass_t | sqlapi_connect (SAConnection *conn, const SAChar *szConnectionStr, const SAChar *szUser, const SAChar *szPassword, SAException *err) |
| Connects SAConnection handle. More... | |
| SAErrorClass_t | sqlapi_disconnect (SAConnection *conn, SAException *err) |
| Disconnects SAConnection handle. More... | |
| SABool_t | sqlapi_is_connected (SAConnection *conn, SAException *err) |
| Checks if SAConnection is connected. More... | |
| SABool_t | sqlapi_is_alive (SAConnection *conn, SAException *err) |
| Checks if SAConnection is alive. More... | |
| void | sqlapi_reset_connection (SAConnection *conn) |
| Resets SAConnection handle. More... | |
| SAErrorClass_t | sqlapi_commit (SAConnection *conn, SAException *err) |
| Commits the database session changes. More... | |
| SAErrorClass_t | sqlapi_rollback (SAConnection *conn, SAException *err) |
| Rollbacks the database session changes. More... | |
| SAErrorClass_t | sqlapi_set_auto_commit (SAConnection *conn, SAAutoCommit_t mode, SAException *err) |
| Changes the database session auto-commit mode. More... | |
| SAErrorClass_t | sqlapi_set_isolation_level (SAConnection *conn, SAIsolationLevel_t level, SAException *err) |
| Changes the database session isolation level. More... | |
| SACommand * | sqlapi_alloc_command (SAConnection *conn) |
| Allocates new command handle. More... | |
| void | sqlapi_free_command (SACommand **pcmd) |
| Releases all command handle related resources. More... | |
| void | sqlapi_set_command_option (SACommand *cmd, const SAChar *szOption, const SAChar *szValue) |
| Sets SACommand handle option. More... | |
| SAErrorClass_t | sqlapi_execute (SACommand *cmd, const SAChar *szQuery, SAException *err) |
| Executes SQL command. More... | |
| SAErrorClass_t | sqlapi_unexecute (SACommand *cmd, SAException *err) |
| Un-executes SQL command. More... | |
| SAErrorClass_t | sqlapi_close_command (SACommand *cmd, SAException *err) |
| Closes the specified SACommand object. More... | |
| sa_uint64_t | sqlapi_rows_affected (SACommand *cmd, SAException *err) |
| Returns number of rows affected by last DML operation. More... | |
| void | sqlapi_reset_command (SACommand *cmd) |
| Resets SACommand handle. More... | |
| SABool_t | sqlapi_is_result_set (SACommand *cmd, SAException *err) |
| Checks if any result set exists. More... | |
| SABool_t | sqlapi_fetch_next (SACommand *cmd, SAException *err) |
| Fetches next row of the result set. More... | |
| SABool_t | sqlapi_fetch_prior (SACommand *cmd, SAException *err) |
| Fetches previous row of the result set. More... | |
| SABool_t | sqlapi_fetch_first (SACommand *cmd, SAException *err) |
| Fetches the first row of the result set. More... | |
| SABool_t | sqlapi_fetch_last (SACommand *cmd, SAException *err) |
| Fetches the last row of the result set. More... | |
| SABool_t | sqlapi_fetch_pos (SACommand *cmd, int offset, SABool_t relative, SAException *err) |
| Fetches the specified row of the result set. More... | |
| int | sqlapi_param_count (SACommand *cmd, SAException *err) |
| Returns the command parameters count. More... | |
| SAParam * | sqlapi_param_by_index (SACommand *cmd, int nIndex, SAException *err) |
| Returns SAParam handle. More... | |
| SAParam * | sqlapi_param_by_name (SACommand *cmd, const SAChar *szParamByName, SAException *err) |
| Returns SAParam handle. More... | |
| SADataType_t | sqlapi_param_type (const SAParam *par) |
| Returns SAParam type. More... | |
| SAParamDirType_t | sqlapi_param_direction (const SAParam *par) |
| Returns SAParam direction. More... | |
| int | sqlapi_param_native_type (const SAParam *par) |
| Returns SAParam native type. More... | |
| size_t | sqlapi_param_size (const SAParam *par) |
| Returns SAParam size. More... | |
| int | sqlapi_param_precision (const SAParam *par) |
| Returns SAParam precision. More... | |
| int | sqlapi_param_scale (const SAParam *par) |
| Returns SAParam scale. More... | |
| const SAValueRead * | sqlapi_param_value (SACommand *cmd, int nParamByID, SAException *err) |
| Returns parameter value handle. More... | |
| const SAValueRead * | sqlapi_param_value_by_name (SACommand *cmd, const SAChar *szParamByName, SAException *err) |
| Returns parameter value handle. More... | |
| void | sqlapi_param_set_short (SAParam *par, short val) |
| Sets the parameter value as short integer. More... | |
| void | sqlapi_param_set_ushort (SAParam *par, unsigned short val) |
| Sets the parameter value as unsigned short integer. More... | |
| void | sqlapi_param_set_int32 (SAParam *par, sa_int32_t val) |
| Sets the parameter value as integer. More... | |
| void | sqlapi_param_set_uint32 (SAParam *par, sa_uint32_t val) |
| Sets the parameter value as unsigned integer. More... | |
| void | sqlapi_param_set_int64 (SAParam *par, sa_int64_t val) |
| Sets the parameter value as 64-bit integer. More... | |
| void | sqlapi_param_set_uint64 (SAParam *par, sa_uint64_t val) |
| Sets the parameter value as unsigned 64-bit integer. More... | |
| void | sqlapi_param_set_string (SAParam *par, const SAString *val) |
| Sets the parameter value as string. More... | |
| void | sqlapi_param_set_numeric (SAParam *par, const SANumeric *val) |
| Sets the parameter value as numeric. More... | |
| void | sqlapi_param_set_datetime (SAParam *par, const SADateTime *val) |
| Sets the parameter value as date/time. More... | |
| void | sqlapi_param_set_double (SAParam *par, double val) |
| Sets the parameter value as double. More... | |
| void | sqlapi_param_set_bytes (SAParam *par, const SAString *val) |
| Sets the parameter value as binary data. More... | |
| SAParam * | sqlapi_param (SACommand *cmd, int nParamByID, SAException *err) |
| Returns parameter handle. More... | |
| int | sqlapi_field_count (SACommand *cmd, SAException *err) |
| Returns the result set field count. More... | |
| SABool_t | sqlapi_field_exists (SACommand *cmd, const SAChar *szField, SAException *err) |
| Checks if the field exists in the result set. More... | |
| const SAField * | sqlapi_field (SACommand *cmd, int nField, SAException *err) |
| Returns the result set field handle. More... | |
| const SAValueRead * | sqlapi_field_value (SACommand *cmd, int nField, SAException *err) |
| Returns the result set field value handle. More... | |
| const SAField * | sqlapi_field_by_name (SACommand *cmd, const SAChar *szField, SAException *err) |
| Returns the result set field handle. More... | |
| const SAValueRead * | sqlapi_field_value_by_name (SACommand *cmd, const SAChar *szField, SAException *err) |
| Returns the result set field value handle. More... | |
| const SAChar * | sqlapi_field_name (const SAField *field) |
| Returns SAField name. More... | |
| SADataType_t | sqlapi_field_type (const SAField *field) |
| Returns SAField type. More... | |
| int | sqlapi_field_native_type (const SAField *field) |
| Returns SAField native type. More... | |
| size_t | sqlapi_field_data_size (const SAField *field) |
| Returns SAField size. More... | |
| int | sqlapi_field_precision (const SAField *field) |
| Returns SAField precision. More... | |
| int | sqlapi_field_scale (const SAField *field) |
| Returns SAField scale. More... | |
| SAString * | sqlapi_value_as_bytes (const SAValueRead *val) |
| Returns the binary data of the value. More... | |
| const SACommand * | sqlapi_value_as_cursor (const SAValueRead *val) |
| Returns the resultset associated with the value. More... | |
| double | sqlapi_value_as_double (const SAValueRead *val) |
| Returns the double value. More... | |
| SADateTime * | sqlapi_value_as_datetime (const SAValueRead *val) |
| Returns the date/time value. More... | |
| SANumeric * | sqlapi_value_as_numeric (const SAValueRead *val) |
| Returns the numeric value. More... | |
| SAString * | sqlapi_value_as_string (const SAValueRead *val) |
| Returns the string value. More... | |
| SABool_t | sqlapi_value_is_null (const SAValueRead *val) |
| Checks if the value is NULL. | |
| short | sqlapi_value_as_short (const SAValueRead *val) |
| Returns the short value. More... | |
| unsigned short | sqlapi_value_as_ushort (const SAValueRead *val) |
| Returns the unsigned short value. More... | |
| sa_int32_t | sqlapi_value_as_int32 (const SAValueRead *val) |
| Returns the 32-bit integer value. More... | |
| sa_uint32_t | sqlapi_value_as_uint32 (const SAValueRead *val) |
| Returns the unsigned 32-bit integer value. More... | |
| sa_int64_t | sqlapi_value_as_int64 (const SAValueRead *val) |
| Returns the 64-bit integer value. More... | |
| sa_uint64_t | sqlapi_value_as_uint64 (const SAValueRead *val) |
| Returns the unsigned 64-bit integer value. More... | |
| SAString * | sqlapi_alloc_string (const SAString *src) |
| Allocates new string handle. More... | |
| void | sqlapi_free_string (SAString **pstr) |
| Releases the string handle. More... | |
| const char * | sqlapi_string_mb (const SAString *str) |
| Returns the multi-byte string stored with SAString handle. More... | |
| size_t | sqlapi_string_mb_length (const SAString *str) |
| Returns the multi-byte string length stored with SAString handle. More... | |
| void | sqlapi_string_set_mb_string (SAString *str, const char *src, size_t len) |
| Sets the multi-byte string into SAString handle. More... | |
| const wchar_t * | sqlapi_string_wide (const SAString *str) |
| Returns the wide string stored with SAString handle. More... | |
| size_t | sqlapi_string_wide_length (const SAString *str) |
| Returns the wide string length stored with SAString handle. More... | |
| void | sqlapi_string_set_wide_string (SAString *str, const wchar_t *src, size_t len) |
| Sets the wide string into SAString handle. More... | |
| const char * | sqlapi_string_utf8 (const SAString *str) |
| Returns the UTF-8 string stored with SAString handle. More... | |
| size_t | sqlapi_string_utf8_length (const SAString *str) |
| Returns the UTF-8 string length stored with SAString handle. More... | |
| void | sqlapi_string_set_utf8_string (SAString *str, const char *src, size_t len) |
| Sets the UTF-8 string into SAString handle. More... | |
| const void * | sqlapi_string_binary (const SAString *str) |
| Returns the binary data stored with SAString handle. More... | |
| size_t | sqlapi_string_binary_length (const SAString *str) |
| Returns the binary data length stored with SAString handle. More... | |
| void | sqlapi_string_set_binary_string (SAString *str, const void *src, size_t len) |
| Sets the binary data into SAString handle. More... | |
| SANumeric * | sqlapi_alloc_numeric (const SANumeric *src) |
| Allocates new numeric handle. More... | |
| void | sqlapi_free_numeric (SANumeric **pnum) |
| Releases the numeric handle. More... | |
| SAString * | sqlapi_numeric_string (const SANumeric *num) |
| Converts SANumeric handle value into SAString. More... | |
| unsigned char | sqlapi_numeric_precision (const SANumeric *num) |
| Returns SANumeric precision. More... | |
| unsigned char | sqlapi_numeric_scale (const SANumeric *num) |
| Returns SANumeric scale. More... | |
| unsigned char | sqlapi_numeric_sign (const SANumeric *num) |
| Returns SANumeric sign. More... | |
| double | sqlapi_numeric_double (const SANumeric *num) |
| Converts SANumeric handle value into double. More... | |
| sa_int64_t | sqlapi_numeric_int64 (const SANumeric *num) |
| Converts SANumeric handle value into 64-bit integer. More... | |
| sa_uint64_t | sqlapi_numeric_uint64 (const SANumeric *num) |
| Converts SANumeric handle value into unsigned 64-bit integer. More... | |
| void | sqlapi_numeric_set_string (SANumeric *num, const SAChar *val) |
| Converts character string into SANumeric handle value. More... | |
| void | sqlapi_numeric_set_double (SANumeric *num, double val) |
| Converts double into SANumeric handle value. More... | |
| void | sqlapi_numeric_set_int64 (SANumeric *num, sa_int64_t val) |
| Converts 64-bit integer into SANumeric handle value. More... | |
| void | sqlapi_numeric_set_uint64 (SANumeric *num, sa_uint64_t val) |
| Converts unsigned 64-bit integer into SANumeric handle value. More... | |
| SADateTime * | sqlapi_alloc_datetime (const SADateTime *src) |
| Allocates new datetime handle. More... | |
| void | sqlapi_free_datetime (SADateTime **pdt) |
| Releases the datetime handle. More... | |
| SAString * | sqlapi_datetime_string (const SADateTime *dt) |
| Converts SADateTime handle value into SAString. More... | |
| struct tm | sqlapi_datetime_tm (const SADateTime *dt) |
| Converts SADateTime handle value into struct tm. More... | |
| double | sqlapi_datetime_double (const SADateTime *dt) |
| Converts SADateTime handle value into double. More... | |
| int | sqlapi_datetime_year (const SADateTime *dt) |
| Returns the year of SADateTime handle value. More... | |
| int | sqlapi_datetime_month (const SADateTime *dt) |
| Returns the month of SADateTime handle value. More... | |
| int | sqlapi_datetime_day (const SADateTime *dt) |
| Returns the day of SADateTime handle value. More... | |
| int | sqlapi_datetime_week_day (const SADateTime *dt) |
| Returns the week day of SADateTime handle value. More... | |
| int | sqlapi_datetime_year_day (const SADateTime *dt) |
| Returns the year day of SADateTime handle value. More... | |
| int | sqlapi_datetime_hour (const SADateTime *dt) |
| Returns the hour of SADateTime handle value. More... | |
| int | sqlapi_datetime_min (const SADateTime *dt) |
| Returns the minute of SADateTime handle value. More... | |
| int | sqlapi_datetime_sec (const SADateTime *dt) |
| Returns the second of SADateTime handle value. More... | |
| const SAChar * | sqlapi_datetime_timezone (const SADateTime *dt) |
| Returns the timezone of SADateTime handle value. More... | |
| unsigned int | sqlapi_datetime_fraction (const SADateTime *dt) |
| Returns the fraction of SADateTime handle value. More... | |
| void | sqlapi_datetime_set_tm (SADateTime *dt, struct tm val) |
| Converts struct tm into SADateTime handle value. More... | |
| void | sqlapi_datetime_set_double (SADateTime *dt, double val) |
| Converts double into SADateTime handle value. More... | |
| void | sqlapi_datetime_set_datetime (SADateTime *dt, int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, unsigned int nFraction, const SAChar *timezone) |
| Sets SADateTime handle datetime value. | |
| void | sqlapi_datetime_set_date (SADateTime *dt, int nYear, int nMonth, int nDay) |
| Sets SADateTime handle date value. | |
| void | sqlapi_datetime_set_time (SADateTime *dt, int nHour, int nMin, int nSec, unsigned int nFraction) |
| Sets SADateTime handle time value. | |
| SABool_t | sqlapi_datetime_has_date (const SADateTime *dt) |
| Checks if SADateTime handle value has date part. | |
| SABool_t | sqlapi_datetime_has_time (const SADateTime *dt) |
| Checks if SADateTime handle value has time part. | |
Detailed Description
SQLAPI++ C interface functions.
SQLAPI++ C interface functions are built on C++ classes and methods. They are compiled by C++ compiler but can be used in pure C code - just include the same SQLAPI.h header file in your sources, compile and link them with SQLAPI++ library.
SQLAPI++ C functions interact with C++ interfaces by using 'handles' - pointers to SQLAPI++ objects that are declared as structs for C code.
Function Documentation
◆ sqlapi_alloc_error()
| SAException* sqlapi_alloc_error | ( | ) |
Allocates the Library error handle.
This function allocates SAException* handle that can be used for getting error details.
After the work is done the received error handle should be released with sqlapi_free_error function.
◆ sqlapi_free_error()
| void sqlapi_free_error | ( | SAException ** | perr | ) |
Releases all error handle related resources.
Function checks that the parameter passed to it points to non-zero handle.
After all handle related structures are successfully released the handle pointer is set to 0.
- Parameters
-
perr Pointer to error handle
◆ sqlapi_error_text()
| SAString* sqlapi_error_text | ( | const SAException * | err | ) |
Gets the SAException error text.
This function returns the error text for related SAException* handle.
- See also
- SAException::ErrText
◆ sqlapi_error_message()
| const SAChar* sqlapi_error_message | ( | const SAException * | err | ) |
Gets the SAException error message.
This function returns the error message associated with SAException* handle.
- See also
- SAException::ErrText
◆ sqlapi_error_native_code()
| int sqlapi_error_native_code | ( | const SAException * | err | ) |
Gets the SAException error native code.
This function returns DBMS error native code associated with SAException* handle.
- See also
- SAException::ErrNativeCode
◆ sqlapi_error_pos()
| int sqlapi_error_pos | ( | const SAException * | err | ) |
Gets the SAException error position.
This function returns DBMS error position associated with SAException* handle.
- See also
- SAException::ErrPos
◆ sqlapi_error_class()
| SAErrorClass_t sqlapi_error_class | ( | const SAException * | err | ) |
Gets the SAException error class.
This function returns the error class associated with SAException* handle.
- See also
- SAException::ErrClass
◆ sqlapi_error_nested()
| const SAException* sqlapi_error_nested | ( | const SAException * | err | ) |
Gets the SAException nested error.
This function returns the nested error associated with SAException* handle.
- See also
- SAException::NestedException
◆ sqlapi_alloc_api()
| SAPI* sqlapi_alloc_api | ( | ) |
Allocates new API handle.
After the work is done the received API handle should be released with sqlapi_free function.
◆ sqlapi_free_api()
| void sqlapi_free_api | ( | SAPI ** | papi | ) |
Releases all API handle related resources.
Function checks that the parameter passed to it points to non-zero handle.
After all handle related structures are successfully released the handle pointer is set to 0.
- Parameters
-
papi Pointer to SAPI handle
◆ sqlapi_set_api_option()
Sets SAPI handle option.
- See also
- SAPI::setOption
◆ sqlapi_init()
| SAErrorClass_t sqlapi_init | ( | SAPI * | api, |
| SAClient_t | type, | ||
| SAException * | err | ||
| ) |
◆ sqlapi_alloc_connection()
| SAConnection* sqlapi_alloc_connection | ( | SAPI * | api | ) |
Allocates new connection handle.
After the work is done the received connection handle should be released with sqlapi_free_connection function.
◆ sqlapi_free_connection()
| void sqlapi_free_connection | ( | SAConnection ** | pcon | ) |
Releases all connection handle related resources.
Function checks that the parameter passed to it points to non-zero handle.
After all handle related structures are successfully released the handle pointer is set to 0.
- Parameters
-
pcon Pointer to SAConnection handle
◆ sqlapi_set_connection_option()
| void sqlapi_set_connection_option | ( | SAConnection * | conn, |
| const SAChar * | szOption, | ||
| const SAChar * | szValue | ||
| ) |
Sets SAConnection handle option.
- See also
- SAConnection::setOption
◆ sqlapi_connect()
| SAErrorClass_t sqlapi_connect | ( | SAConnection * | conn, |
| const SAChar * | szConnectionStr, | ||
| const SAChar * | szUser, | ||
| const SAChar * | szPassword, | ||
| SAException * | err | ||
| ) |
Connects SAConnection handle.
- Parameters
-
conn The connection handle szConnectionStr The connection string (DBMS specific) szUser The username (or an empty string for OS authentication if supported) szPassword The password err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::Connect
◆ sqlapi_disconnect()
| SAErrorClass_t sqlapi_disconnect | ( | SAConnection * | conn, |
| SAException * | err | ||
| ) |
Disconnects SAConnection handle.
- Parameters
-
conn The connection handle err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::Disconnect
◆ sqlapi_is_connected()
| SABool_t sqlapi_is_connected | ( | SAConnection * | conn, |
| SAException * | err | ||
| ) |
Checks if SAConnection is connected.
- Parameters
-
conn The connection handle err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::isConnected
◆ sqlapi_is_alive()
| SABool_t sqlapi_is_alive | ( | SAConnection * | conn, |
| SAException * | err | ||
| ) |
Checks if SAConnection is alive.
- Parameters
-
conn The connection handle err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::isAlive
◆ sqlapi_reset_connection()
| void sqlapi_reset_connection | ( | SAConnection * | conn | ) |
◆ sqlapi_commit()
| SAErrorClass_t sqlapi_commit | ( | SAConnection * | conn, |
| SAException * | err | ||
| ) |
Commits the database session changes.
- Parameters
-
conn The connection handle err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::Commit
◆ sqlapi_rollback()
| SAErrorClass_t sqlapi_rollback | ( | SAConnection * | conn, |
| SAException * | err | ||
| ) |
Rollbacks the database session changes.
- Parameters
-
conn The connection handle err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::Rollback
◆ sqlapi_set_auto_commit()
| SAErrorClass_t sqlapi_set_auto_commit | ( | SAConnection * | conn, |
| SAAutoCommit_t | mode, | ||
| SAException * | err | ||
| ) |
Changes the database session auto-commit mode.
- Parameters
-
conn The connection handle mode The auto-commit mode err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::setAutoCommit
◆ sqlapi_set_isolation_level()
| SAErrorClass_t sqlapi_set_isolation_level | ( | SAConnection * | conn, |
| SAIsolationLevel_t | level, | ||
| SAException * | err | ||
| ) |
Changes the database session isolation level.
- Parameters
-
conn The connection handle level The isolation level err The error handle for the detailed diagnostic or 0
- See also
- SAConnection::setIsolationLevel
◆ sqlapi_alloc_command()
| SACommand* sqlapi_alloc_command | ( | SAConnection * | conn | ) |
Allocates new command handle.
- Parameters
-
conn The SAConnection handle
After the work is done the received command handle should be released with sqlapi_free_command function.
◆ sqlapi_free_command()
| void sqlapi_free_command | ( | SACommand ** | pcmd | ) |
Releases all command handle related resources.
Function checks that the parameter passed to it points to non-zero handle.
After all handle related structures are successfully released the handle pointer is set to 0.
- Parameters
-
pcmd Pointer to SACommand handle
◆ sqlapi_set_command_option()
Sets SACommand handle option.
- See also
- SACommand::setOption
◆ sqlapi_execute()
| SAErrorClass_t sqlapi_execute | ( | SACommand * | cmd, |
| const SAChar * | szQuery, | ||
| SAException * | err | ||
| ) |
Executes SQL command.
- Parameters
-
cmd The command handle szQuery SQL command (or 0 - then he previously prepared command executed again) err The error handle for the detailed diagnostic or 0
◆ sqlapi_unexecute()
| SAErrorClass_t sqlapi_unexecute | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Un-executes SQL command.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
◆ sqlapi_close_command()
| SAErrorClass_t sqlapi_close_command | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Closes the specified SACommand object.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
◆ sqlapi_rows_affected()
| sa_uint64_t sqlapi_rows_affected | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Returns number of rows affected by last DML operation.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
◆ sqlapi_reset_command()
| void sqlapi_reset_command | ( | SACommand * | cmd | ) |
◆ sqlapi_is_result_set()
| SABool_t sqlapi_is_result_set | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Checks if any result set exists.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
- See also
- SACommand::isResultSet
◆ sqlapi_fetch_next()
| SABool_t sqlapi_fetch_next | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Fetches next row of the result set.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
- See also
- SACommand::FetchNext
◆ sqlapi_fetch_prior()
| SABool_t sqlapi_fetch_prior | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Fetches previous row of the result set.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
- See also
- SACommand::FetchPrior
◆ sqlapi_fetch_first()
| SABool_t sqlapi_fetch_first | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Fetches the first row of the result set.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
- See also
- SACommand::FetchFirst
◆ sqlapi_fetch_last()
| SABool_t sqlapi_fetch_last | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Fetches the last row of the result set.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
- See also
- SACommand::FetchLast
◆ sqlapi_fetch_pos()
| SABool_t sqlapi_fetch_pos | ( | SACommand * | cmd, |
| int | offset, | ||
| SABool_t | relative, | ||
| SAException * | err | ||
| ) |
Fetches the specified row of the result set.
- Parameters
-
cmd The command handle offset The row offset relative The offset specified is relative or absolute err The error handle for the detailed diagnostic or 0
- See also
- SACommand::FetchPos
◆ sqlapi_param_count()
| int sqlapi_param_count | ( | SACommand * | cmd, |
| SAException * | err | ||
| ) |
Returns the command parameters count.
- Parameters
-
cmd The command handle err The error handle for the detailed diagnostic or 0
- See also
- SACommand::ParamCount
◆ sqlapi_param_by_index()
| SAParam* sqlapi_param_by_index | ( | SACommand * | cmd, |
| int | nIndex, | ||
| SAException * | err | ||
| ) |
Returns SAParam handle.
- Parameters
-
cmd The command handle nIndex The index of the parameter err The error handle for the detailed diagnostic or 0
- See also
- SACommand::ParamByIndex
◆ sqlapi_param_by_name()
| SAParam* sqlapi_param_by_name | ( | SACommand * | cmd, |
| const SAChar * | szParamByName, | ||
| SAException * | err | ||
| ) |
Returns SAParam handle.
- Parameters
-
cmd The command handle szParamByName The name of the parameter err The error handle for the detailed diagnostic or 0
- See also
- SACommand::Param
◆ sqlapi_param_type()
| SADataType_t sqlapi_param_type | ( | const SAParam * | par | ) |
◆ sqlapi_param_direction()
| SAParamDirType_t sqlapi_param_direction | ( | const SAParam * | par | ) |
◆ sqlapi_param_native_type()
| int sqlapi_param_native_type | ( | const SAParam * | par | ) |
◆ sqlapi_param_size()
| size_t sqlapi_param_size | ( | const SAParam * | par | ) |
◆ sqlapi_param_precision()
| int sqlapi_param_precision | ( | const SAParam * | par | ) |
◆ sqlapi_param_scale()
| int sqlapi_param_scale | ( | const SAParam * | par | ) |
◆ sqlapi_param_value()
| const SAValueRead* sqlapi_param_value | ( |