NCBI C++ ToolKit
|
#include "common.h"
#include <ctype.h>
#include "parser.h"
#include <odbcss.h>
#include <freetds/bool.h>
#include <freetds/test_assert.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Classes | |
struct | lookup_int |
struct | attribute |
Macros | |
#define | TYPE(s) { #s, s } |
#define | ATTR(s, t) { #s, s, type_##t, NULL } |
#define | ATTR2(s, t, l) { #s, s, type_##t, l } |
#define | ATTR_PARAMS const struct attribute *attr, const char *expected_values[] |
#define | TEST_FILE "describecol.in" |
Typedefs | |
typedef void(* | check_attr_t) (const struct attribute *attr, const char *expected_values[]) |
Enumerations | |
enum | test_type_t { type_INTEGER , type_UINTEGER , type_SMALLINT , type_LEN , type_CHARP , type_DESC , type_VOIDP , type_INTEGER , type_SMALLINT , type_LEN , type_CHARP , type_INTEGER , type_UINTEGER , type_SMALLINT , type_LEN , type_CHARP , type_DESC , type_VOIDP , type_INTEGER , type_SMALLINT , type_LEN , type_CHARP } |
Functions | |
static int | get_int (const char *s) |
static int | lookup (const char *name, const struct lookup_int *table) |
static const char * | unlookup (SQLINTEGER value, const struct lookup_int *table) |
static const struct attribute * | lookup_attr (const char *name) |
static bool | is_contained (const char *s, const char *list[]) |
static bool | is_contained_lookup (SQLINTEGER i, const char *list[], const struct lookup_int *table) |
static void | print_values (FILE *f, const char *list[]) |
static void | check_attr_ird (const struct attribute *attr, const char *expected_values[]) |
static void | check_attr_ard (const struct attribute *attr, const char *expected_values[]) |
static void | check_attr_none (const struct attribute *attr, const char *expected_values[]) |
int | main (int argc, char *argv[]) |
Variables | |
static int | g_result = 0 |
static struct lookup_int | sql_types [] |
static struct lookup_int | sql_bools [] |
static const struct attribute | attributes [] |
Definition at line 159 of file describecol.c.
#define TEST_FILE "describecol.in" |
#define TYPE | ( | s | ) | { #s, s } |
Definition at line 160 of file describecol.c.
enum test_type_t |
Definition at line 110 of file describecol.c.
Definition at line 240 of file describecol.c.
References buf, C, g_result, i, is_contained(), is_contained_lookup(), odbc_fatal(), odbc_line_num, odbc_stmt, print_values(), si, SQL_ATTR_APP_ROW_DESC, SQL_ERROR, SQL_NULL_HDESC, SQL_SUCCEEDED, SQLGetDescField(), SQLGetStmtAttr(), SQLLEN, type_CHARP, type_INTEGER, type_LEN, type_SMALLINT, and unlookup().
Referenced by main().
Definition at line 192 of file describecol.c.
References buf, C, CHKDescribeCol, g_result, i, is_contained(), is_contained_lookup(), len, NULL, odbc_fatal(), odbc_line_num, odbc_stmt, print_values(), si, SQL_DESC_LENGTH, SQL_DESC_SCALE, SQL_IS_INTEGER, SQL_SUCCEEDED, SQLColAttribute(), SQLLEN, SQLULEN, type_CHARP, and unlookup().
Referenced by main().
|
static |
Definition at line 290 of file describecol.c.
Referenced by main().
Definition at line 17 of file describecol.c.
References l(), and odbc_fatal().
Definition at line 163 of file describecol.c.
References util::strcmp().
Referenced by check_attr_ard(), and check_attr_ird().
|
static |
Definition at line 173 of file describecol.c.
References i, lookup(), and table.
Referenced by check_attr_ard(), and check_attr_ird().
|
static |
Definition at line 37 of file describecol.c.
References get_int(), util::strcmp(), and table.
Referenced by is_contained_lookup(), and main().
Definition at line 146 of file describecol.c.
References attributes, i, attribute::name, NULL, odbc_fatal(), util::strcmp(), and TDS_VECTOR_SIZE.
Referenced by main().
Definition at line 295 of file describecol.c.
References check_attr_ard(), check_attr_ird(), check_attr_none(), CHKFetch, cmd, exit(), expected, f, FREETDS_SRCDIR, g_result, get_int(), i, len, attribute::lookup, lookup(), lookup_attr(), NULL, odbc_clear_bools(), odbc_command, odbc_command_with_result(), odbc_connect(), odbc_disconnect(), odbc_fatal(), ODBC_FREE, odbc_get_cmd_line(), odbc_get_str(), odbc_get_tok(), odbc_init_bools(), odbc_init_parser(), odbc_reset_statement, odbc_stmt, odbc_use_version3, sql, SQL_ATTR_APP_ROW_DESC, SQL_C_SLONG, SQL_ERROR, SQL_NTS, SQL_SUCCEEDED, SQL_SUCCESS, SQLBindCol(), SQLGetStmtAttr(), SQLLEN, SQLMoreResults(), SQLSetDescField(), util::strcmp(), TDS_INT2PTR, TEST_FILE, attribute::type, type_CHARP, type_INTEGER, type_LEN, type_SMALLINT, rapidjson::value, and attribute::value.
Definition at line 183 of file describecol.c.
References f.
Referenced by check_attr_ard(), and check_attr_ird().
|
static |
Definition at line 50 of file describecol.c.
References buf, table, and rapidjson::value.
Referenced by check_attr_ard(), and check_attr_ird().
Definition at line 50 of file describecol.c.
Referenced by lookup_attr().
|
static |
Definition at line 14 of file describecol.c.
Referenced by check_attr_ard(), check_attr_ird(), and main().
|
static |
|
static |
Definition at line 50 of file describecol.c.