[FEATURE]Compile table must register plugin table to get compile ex_data & maat_state_get_compile_table_ids API
This commit is contained in:
@@ -37,12 +37,6 @@ void *group2compile_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
void group2compile_schema_free(void *g2c_schema);
|
||||
int group2compile_associated_compile_table_id(void *g2c_schema);
|
||||
|
||||
int compile_table_set_ex_data_schema(struct compile_schema *compile_schema, int table_id,
|
||||
maat_ex_new_func_t *new_func,
|
||||
maat_ex_free_func_t *free_func,
|
||||
maat_ex_dup_func_t *dup_func,
|
||||
long argl, void *argp);
|
||||
|
||||
/* compile runtime API */
|
||||
void *compile_runtime_new(void *compile_schema, size_t max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
@@ -70,14 +64,6 @@ size_t compile_runtime_get_hit_paths(struct compile_runtime *compile_rt, int thr
|
||||
struct maat_hit_path *hit_path_array,
|
||||
size_t array_size, size_t n_internal_hit_path);
|
||||
|
||||
void *compile_runtime_get_ex_data(struct compile_runtime *compile_rt,
|
||||
struct compile_schema *compile_schema,
|
||||
long long compile_id);
|
||||
void compile_runtime_ex_data_iterate(struct compile_runtime *compile_rt,
|
||||
struct compile_schema *compile_schema);
|
||||
|
||||
void compile_runtime_garbage_collect_routine(void *compile_runtime);
|
||||
|
||||
/* group2compile runtime API */
|
||||
void *group2compile_runtime_new(void *g2c_schema, size_t max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
@@ -119,6 +105,9 @@ size_t maat_compile_state_get_hit_groups(struct maat_compile_state *compile_stat
|
||||
struct maat_hit_group *hit_group_array,
|
||||
size_t array_size);
|
||||
|
||||
int maat_compile_state_get_compile_table_id(struct maat_compile_state *compile_state,
|
||||
long long compile_id);
|
||||
|
||||
int maat_compile_state_has_NOT_clause(struct maat_compile_state *compile_state);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -26,12 +26,15 @@ void maat_kv_store_free(struct maat_kv_store *store);
|
||||
|
||||
int maat_kv_register(struct maat_kv_store *store, const char *key, long long value);
|
||||
|
||||
int maat_kv_read(struct maat_kv_store *store, const char *key, long long *value);
|
||||
int maat_kv_read(struct maat_kv_store *store, const char *key, long long *value_array, size_t n_array);
|
||||
|
||||
int maat_kv_read_unNull(struct maat_kv_store *store, const char *key, size_t key_sz, long long *value);
|
||||
int maat_kv_read_unNull(struct maat_kv_store *store, const char *key, size_t key_sz,
|
||||
long long *value_array, size_t n_array);
|
||||
|
||||
int maat_kv_write(struct maat_kv_store *store, const char *key, long long value);
|
||||
|
||||
int maat_kv_append(struct maat_kv_store *store, const char *key, long long value);
|
||||
|
||||
struct maat_kv_store *maat_kv_store_duplicate(struct maat_kv_store *store);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -59,7 +59,23 @@ void table_manager_destroy(struct table_manager *tbl_mgr);
|
||||
size_t table_manager_table_size(struct table_manager *tbl_mgr);
|
||||
size_t table_manager_table_count(struct table_manager *tbl_mgr);
|
||||
|
||||
int table_manager_get_table_id(struct table_manager *tbl_mgr, const char *name);
|
||||
int table_manager_get_table_id(struct table_manager *tbl_mgr, const char *table_name);
|
||||
/**
|
||||
* @brief get table_name's all conjunction parents' table_id
|
||||
*
|
||||
* for example: "table_id": 1,
|
||||
* "table_name":"COMPILE_CONJ"
|
||||
* "db_tables":["COMPILE_DEFAULT", "COMPILE_ALIAS"]
|
||||
*
|
||||
* "table_id": 2,
|
||||
* "table_name": "COMPILE_PLUGIN",
|
||||
* "db_tables": ["COMPILE_DEFAULT"]
|
||||
*
|
||||
* so COMPILE_DEFAULT has two conjunction parents whose table_id is 1 and 2.
|
||||
*/
|
||||
int table_manager_get_conj_parent_table_ids(struct table_manager *tbl_mgr, const char *table_name,
|
||||
long long *table_ids_array, size_t n_table_ids_array);
|
||||
|
||||
const char *table_manager_get_table_name(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
enum table_type table_manager_get_table_type(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
Reference in New Issue
Block a user