25 static void print_node(
SQLPNODE * nptr,
int level)
29 for (i = 0; i < level; i++) {
36 print_node(nptr->
left, level + 1);
39 print_node(nptr->
right, level + 1);
45 fprintf(stderr,
"val: NULL\n");
48 fprintf(stderr,
"val: %e\n", nptr->
value.
d);
51 fprintf(stderr,
"val: %d\n", nptr->
value.
i);
54 fprintf(stderr,
"val: '%s'\n", nptr->
value.
s);
67 fprintf(stderr,
"********** SQL PARSER RESULT **********\n");
69 fprintf(stderr,
"COMMAND: ");
72 fprintf(stderr,
"ADD COLUMN\n");
75 fprintf(stderr,
"CREATE\n");
78 fprintf(stderr,
"DROP\n");
81 fprintf(stderr,
"DROP COLUMN\n");
84 fprintf(stderr,
"INSERT\n");
87 fprintf(stderr,
"UPDATE\n");
90 fprintf(stderr,
"SELECT\n");
93 fprintf(stderr,
"DELETE\n");
96 fprintf(stderr,
"UNKNOWN\n");
102 for (i = 0; i < st->
nCol; i++) {
104 fprintf(stderr,
"COLUMN %2d: ", i + 1);
107 fprintf(stderr,
"type:varchar width:%d",
111 fprintf(stderr,
"type:integer");
114 fprintf(stderr,
"type:double");
117 fprintf(stderr,
"type:date");
120 fprintf(stderr,
"type:time");
123 fprintf(stderr,
"type:unknown");
129 fprintf(stderr,
"COLUMN %2d: %s\n", i + 1,
sqlpStmt->
Col[i].
s);
134 for (i = 0; i < st->
nVal; i++) {
135 fprintf(stderr,
"VALUE %2d ", i + 1);
147 fprintf(stderr,
"(unknown) : null\n");
150 fprintf(stderr,
"(expression) :\n");
154 fprintf(stderr,
"unknown\n");
160 fprintf(stderr,
"WHERE:\n");
176 fprintf(stderr,
"***************************************\n");
#define SQLP_NODE_EXPRESSION
int sqpPrintStmt(SQLPSTMT *st)
char table[SQLP_MAX_TABLE+1]
char * sqpOperatorName(int)