24 static void print_node(
SQLPNODE *nptr,
int level)
28 for (i = 0; i < level; i++) {
35 print_node(nptr->
left, level + 1);
38 print_node(nptr->
right, level + 1);
44 fprintf(stderr,
"val: NULL\n");
47 fprintf(stderr,
"val: %e\n", nptr->
value.
d);
50 fprintf(stderr,
"val: %d\n", nptr->
value.
i);
53 fprintf(stderr,
"val: '%s'\n", nptr->
value.
s);
66 fprintf(stderr,
"********** SQL PARSER RESULT **********\n");
68 fprintf(stderr,
"COMMAND: ");
71 fprintf(stderr,
"ADD COLUMN\n");
74 fprintf(stderr,
"CREATE\n");
77 fprintf(stderr,
"DROP\n");
80 fprintf(stderr,
"DROP COLUMN\n");
83 fprintf(stderr,
"INSERT\n");
86 fprintf(stderr,
"UPDATE\n");
89 fprintf(stderr,
"SELECT\n");
92 fprintf(stderr,
"DELETE\n");
95 fprintf(stderr,
"UNKNOWN\n");
101 for (i = 0; i <
st->nCol; i++) {
103 fprintf(stderr,
"COLUMN %2d: ", i + 1);
109 fprintf(stderr,
"type:integer");
112 fprintf(stderr,
"type:double");
115 fprintf(stderr,
"type:date");
118 fprintf(stderr,
"type:time");
121 fprintf(stderr,
"type:unknown");
127 fprintf(stderr,
"COLUMN %2d: %s\n", i + 1,
sqlpStmt->
Col[i].
s);
132 for (i = 0; i <
st->nVal; i++) {
133 fprintf(stderr,
"VALUE %2d ", i + 1);
145 fprintf(stderr,
"(unknown) : null\n");
148 fprintf(stderr,
"(expression) :\n");
152 fprintf(stderr,
"unknown\n");
158 fprintf(stderr,
"WHERE:\n");
172 fprintf(stderr,
"***************************************\n");
char * sqpOperatorName(int)
int sqpPrintStmt(SQLPSTMT *st)
#define SQLP_NODE_EXPRESSION
char table[SQLP_MAX_TABLE+1]