refactor hierarchy and maat_table

This commit is contained in:
liuwentan
2023-01-31 20:39:53 +08:00
parent 25f944a1d1
commit cca7d882e1
29 changed files with 1087 additions and 1107 deletions

View File

@@ -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);
}