plugin table support integer&pointer key type

This commit is contained in:
liuwentan
2023-03-16 09:55:35 +08:00
parent 71d6cbab2c
commit 15ec1549c8
15 changed files with 326 additions and 97 deletions

View File

@@ -49,8 +49,9 @@ int bool_plugin_runtime_commit(void *bool_plugin_runtime, const char *table_name
struct ex_data_runtime *bool_plugin_runtime_get_ex_data_rt(void *bool_plugin_runtime);
int bool_plugin_runtime_get_ex_data(void *fqdn_plugin_runtime, unsigned long long *item_ids,
size_t n_item, void **ex_data_array, size_t n_ex_data);
int bool_plugin_runtime_get_ex_data(void *bool_plugin_runtime, void *bool_plugin_schema,
unsigned long long *item_ids, size_t n_item,
void **ex_data_array, size_t n_ex_data);
#ifdef __cplusplus
}

View File

@@ -64,9 +64,6 @@ struct ex_data_schema *ex_data_schema_new(maat_ex_new_func_t *new_func,
long argl, void *argp);
void ex_data_schema_free(struct ex_data_schema *ex_schema);
void ex_data_runtime_set_schema(struct ex_data_runtime *ex_data_rt,
struct ex_data_schema *schema);
/* set user_ctx API */
void ex_data_runtime_set_ex_container_schema(struct ex_data_runtime *ex_data_rt,
struct ex_container_schema *container_schema);
@@ -78,7 +75,8 @@ struct ex_container *ex_container_new(void *ex_data, void *custom_data);
void ex_container_free(void *ctx, void *data);
/* ex_data_runtime ex data API */
void *ex_data_runtime_row2ex_data(struct ex_data_runtime *ex_data_rt,
void *ex_data_runtime_row2ex_data(struct ex_data_runtime *ex_data_rt,
struct ex_data_schema *ex_schema,
const char *row, const char *key,
size_t key_len);
@@ -96,10 +94,12 @@ size_t ex_data_runtime_ex_container_count(struct ex_data_runtime *ex_data_rt);
int ex_data_runtime_is_updating(struct ex_data_runtime *ex_data_rt);
void *ex_data_runtime_get_ex_data_by_key(struct ex_data_runtime *ex_data_rt,
void *ex_data_runtime_get_ex_data_by_key(struct ex_data_runtime *ex_data_rt,
struct ex_data_schema *ex_schema,
const char *key, size_t key_len);
void *ex_data_runtime_get_ex_data_by_container(struct ex_data_runtime *ex_data_rt,
struct ex_data_schema *ex_schema,
struct ex_container *ex_container);
void *ex_data_runtime_get_custom_data(struct ex_data_runtime *ex_data_rt,

View File

@@ -49,8 +49,8 @@ int fqdn_plugin_runtime_commit(void *fqdn_plugin_runtime, const char *table_name
struct ex_data_runtime *fqdn_plugin_runtime_get_ex_data_rt(void *fqdn_plugin_runtime);
int fqdn_plugin_runtime_get_ex_data(void *fqdn_plugin_runtime, const char *fqdn,
void **ex_data_array, size_t n_ex_data);
int fqdn_plugin_runtime_get_ex_data(void *fqdn_plugin_runtime, void *fqdn_plugin_schema,
const char *fqdn, void **ex_data_array, size_t n_ex_data);
#ifdef __cplusplus
}
#endif

View File

@@ -49,8 +49,9 @@ int ip_plugin_runtime_commit(void *ip_plugin_runtime, const char *table_name);
struct ex_data_runtime *ip_plugin_runtime_get_ex_data_rt(void *ip_plugin_runtime);
int ip_plugin_runtime_get_ex_data(void *ip_plugin_runtime, const struct ip_addr *ip_addr,
void **ex_data_array, size_t n_ex_data_array);
int ip_plugin_runtime_get_ex_data(void *ip_plugin_runtime, void *ip_plugin_schema,
const struct ip_addr *ip_addr, void **ex_data_array,
size_t n_ex_data_array);
#ifdef __cplusplus
}