|
@@ -56,6 +56,7 @@ create_table_stmt: CREATE TABLE IDENTIFIER NEWLINE
|
|
|
cJSON* node = cJSON_CreateObject();
|
|
|
cJSON_AddStringToObject(node, "type", "create_table");
|
|
|
cJSON_AddStringToObject(node, "table_name", $3);
|
|
|
+ cJSON_AddItemToObject(node, "cols", cJSON_CreateArray());
|
|
|
cJSON_AddItemToArray(jroot, node);
|
|
|
}
|
|
|
|
|
@@ -86,7 +87,7 @@ create_col_list: create_definition {
|
|
|
;
|
|
|
|
|
|
create_definition: IDENTIFIER data_type col_options {
|
|
|
- printf("得列 %s %s with options %s: %d\n", $1, $2, $3, strlen($3));
|
|
|
+ sprintf(stderr, "得列 %s %s with options %s: %d\n", $1, $2, $3, strlen($3));
|
|
|
|
|
|
cJSON* node = cJSON_CreateObject();
|
|
|
cJSON_AddStringToObject(node, "type", "create_column");
|