1 #ifndef NDBMEMCACHE_TABLESPEC_H
2 #define NDBMEMCACHE_TABLESPEC_H
5 #error "This file is for C++ only"
18 TableSpec(
const char *db,
const char *tab,
int nkeys,
int nvals);
19 TableSpec(
const char *sqltabname,
const char *keycols,
const char *valcols);
24 void setTable(
const char *db,
const char *
table);
25 void setKeyColumns(
const char *col1, ...);
26 void setValueColumns(
const char *col1, ...);
29 const char *schema_name;
30 const char *table_name;
31 const char *math_column;
32 const char *flags_column;
33 const char *cas_column;
34 const char *exp_column;
35 const char **
const key_columns;
36 const char **
const value_columns;
39 uint32_t static_flags;
45 unsigned schema_name : 1;
46 unsigned table_name : 1;
47 unsigned first_key : 1;
48 unsigned all_key_cols : 1;
49 unsigned first_val : 1;
50 unsigned all_val_cols : 1;
51 unsigned special_cols : 1;
55 static int build_column_list(
const char **
const &array,
const char *list);
61 inline TableSpec::TableSpec(
int nkeys,
int nvals) :
65 math_column(0), flags_column(0),
66 cas_column(0), exp_column(0), static_flags(0),
67 key_columns(new const char *[nkeys]),
68 value_columns(new const char *[nvals]) {
73 inline TableSpec::TableSpec(
const char *db,
const char *tab,
74 int nkeys,
int nvals) :
78 nvaluecols(nvals), static_flags(0),
79 math_column(0), flags_column(0),
80 cas_column(0), exp_column(0),
81 key_columns(new const char *[nkeys]),
82 value_columns(new const char *[nvals]) {
86 inline void TableSpec::setTable(
const char *db,
const char *
table) {