refactor hierarchy and maat_table
This commit is contained in:
@@ -23,14 +23,16 @@ struct virtual_schema {
|
||||
|
||||
void *virtual_schema_new(cJSON *json, const char *table_name, struct log_handle *logger)
|
||||
{
|
||||
size_t read_cnt = 0;
|
||||
//size_t read_cnt = 0;
|
||||
|
||||
cJSON *item = cJSON_GetObjectItem(json, "physical_table");
|
||||
if (NULL == item || item->type != cJSON_Array) {
|
||||
log_error(logger, MODULE_VIRTUAL, "virtual table %s has no physical_table column", table_name);
|
||||
return NULL;
|
||||
}
|
||||
read_cnt++;
|
||||
|
||||
struct virtual_schema *vt_schema = ALLOC(struct virtual_schema, 1);
|
||||
return vt_schema;
|
||||
#if 0
|
||||
struct virtual_schema *vt_schema = ALLOC(struct virtual_schema, 1);
|
||||
int cnt = cJSON_GetArraySize(item);
|
||||
@@ -57,3 +59,8 @@ void *virtual_schema_new(cJSON *json, const char *table_name, struct log_handle
|
||||
return vt_schema;
|
||||
#endif
|
||||
}
|
||||
|
||||
void virtual_schema_free(void *virtual_schema)
|
||||
{
|
||||
FREE(virtual_schema);
|
||||
}
|
||||
Reference in New Issue
Block a user