|
NCBI C++ ToolKit
|
Include dependency graph for genparams.c:Go to the source code of this file.
Go to the repository for this file.
Functions | |
| static const char * | split_collate (ODBC_BUF **buf, const char **type) |
| static int | TestOutput (const char *type, const char *value_to_convert, SQLSMALLINT out_c_type, SQLSMALLINT out_sql_type, const char *expected) |
| static void | TestInput (SQLSMALLINT out_c_type, const char *type, SQLSMALLINT out_sql_type, const char *param_type, const char *value_to_convert) |
| Test a parameter as input to prepared statement. More... | |
| static void | NullInput (SQLSMALLINT out_c_type, SQLSMALLINT out_sql_type, const char *param_type) |
| static const char * | pack (const char *fmt,...) |
| static void | AllTests (void) |
| int | main (int argc, char *argv[]) |
Variables | |
| static const char | tds_no_dm = 0 |
| static char | precision = 18 |
| static char | exec_direct = 0 |
| static char | prepare_before = 0 |
| static char | use_cursors = 0 |
| static int | only_test = 0 |
| static char | check_truncation = 0 |
| static char | use_nts = 0 |
| static int | big_endian = 1 |
|
static |
Definition at line 318 of file genparams.c.
References a, b, big_endian, buf, check_truncation, exec_direct, NULL, NullInput(), odbc_command, odbc_db_is_microsoft(), odbc_db_version(), odbc_db_version_int(), odbc_driver_is_freetds(), odbc_stmt, odbc_tds_version(), only_test, pack(), precision, prepare_before, SQL_BIGINT, SQL_BIT, SQL_C_BINARY, SQL_C_BIT, SQL_C_CHAR, SQL_C_DOUBLE, SQL_C_FLOAT, SQL_C_LONG, SQL_C_NUMERIC, SQL_C_SBIGINT, SQL_C_TYPE_DATE, SQL_C_TYPE_TIME, SQL_C_TYPE_TIMESTAMP, SQL_C_UTINYINT, SQL_C_WCHAR, SQL_DECIMAL, SQL_DOUBLE, SQL_FLOAT, SQL_INTEGER, SQL_LONGVARBINARY, SQL_LONGVARCHAR, SQL_NUMERIC, SQL_REAL, SQL_SUCCESS, SQL_TIMESTAMP, SQL_TINYINT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, SQL_UNBIND, SQL_VARBINARY, SQL_VARCHAR, SQL_WCHAR, SQL_WLONGVARCHAR, SQL_WVARCHAR, SQLBindCol(), SQLFetch(), SQLFreeStmt(), SQLMoreResults(), util::strncmp(), TestInput(), TestOutput(), use_cursors, and use_nts.
Referenced by main().
Definition at line 521 of file genparams.c.
References AllTests(), big_endian, exec_direct, odbc_check_cursor(), odbc_conn_additional_params, odbc_connect(), odbc_disconnect(), odbc_driver_is_freetds(), odbc_reset_statement, odbc_use_version3, prepare_before, setenv, tds_no_dm, and use_cursors.
|
static |
Definition at line 233 of file genparams.c.
References CHKBindParameter, CHKExecDirect, CHKExecute, CHKFetch, CHKMoreResults, CHKPrepare, CHKSetStmtAttr, exec_direct, NULL, odbc_command, odbc_db_is_microsoft(), ODBC_FREE, odbc_reset_statement, prepare_before, SQL_ATTR_CURSOR_SCROLLABLE, SQL_ATTR_CURSOR_TYPE, SQL_CURSOR_DYNAMIC, SQL_NTS, SQL_NULL_DATA, SQL_PARAM_INPUT, SQL_SCROLLABLE, SQLLEN, util::strcmp(), T, and use_cursors.
Referenced by AllTests().
Definition at line 287 of file genparams.c.
References assert, big_endian, i, l(), n, and out().
Referenced by AllTests().
Definition at line 35 of file genparams.c.
References buf, NULL, odbc_buf_asprintf(), and odbc_db_is_microsoft().
Referenced by TestInput(), and TestOutput().
|
static |
Test a parameter as input to prepared statement.
"value_to_convert" will be inserted as database type "type" and C type "out_c_type" into a column of database type "param_type" and SQL type "out_sql_type". Then a select statement check that the column in the database is the same as "value_to_convert". "value_to_convert" can also contain a syntax like "input -> output", in this case the initial inserted value is "input" and the final check will check for "output".
Definition at line 133 of file genparams.c.
References check_truncation, CHKBindParameter, CHKExecDirect, CHKExecute, CHKFetch, CHKMoreResults, CHKPrepare, CHKSetStmtAttr, exec_direct, expected, NULL, odbc_command, ODBC_FREE, odbc_reset_statement, odbc_stmt, prepare_before, split_collate(), SQL_ATTR_CURSOR_SCROLLABLE, SQL_ATTR_CURSOR_TYPE, SQL_CURSOR_DYNAMIC, SQL_NTS, SQL_PARAM_INPUT, SQL_SCROLLABLE, SQLBindCol(), SQLLEN, util::strcmp(), util::strncmp(), T, use_cursors, and use_nts.
Referenced by AllTests().
|
static |
Definition at line 48 of file genparams.c.
References CHKBindParameter, CHKExecDirect, CHKExecute, CHKPrepare, CHKSetStmtAttr, exec_direct, exit(), expected, odbc_c2string(), odbc_command, odbc_driver_is_freetds(), ODBC_FREE, odbc_reset_statement, odbc_stmt, only_test, precision, prepare_before, split_collate(), SQL_ATTR_CURSOR_SCROLLABLE, SQL_ATTR_CURSOR_TYPE, SQL_CURSOR_DYNAMIC, SQL_NTS, SQL_PARAM_OUTPUT, SQL_SCROLLABLE, SQLLEN, SQLMoreResults(), util::strcmp(), util::strncmp(), T, and use_cursors.
Referenced by AllTests().
|
static |
Definition at line 284 of file genparams.c.
Referenced by AllTests(), main(), and pack().
|
static |
Definition at line 120 of file genparams.c.
Referenced by AllTests(), and TestInput().
|
static |
Definition at line 29 of file genparams.c.
Referenced by AllTests(), main(), NullInput(), TestInput(), and TestOutput().
|
static |
Definition at line 32 of file genparams.c.
Referenced by AllTests(), and TestOutput().
|
static |
Definition at line 28 of file genparams.c.
Referenced by AllTests(), and TestOutput().
|
static |
Definition at line 30 of file genparams.c.
Referenced by AllTests(), main(), NullInput(), TestInput(), and TestOutput().
|
static |
Definition at line 25 of file genparams.c.
Referenced by main().
|
static |
Definition at line 31 of file genparams.c.
Referenced by AllTests(), main(), NullInput(), TestInput(), and TestOutput().
|
static |
Definition at line 121 of file genparams.c.
Referenced by AllTests(), and TestInput().