From e604a066abe00b819b61d95e4164aae9a603143c Mon Sep 17 00:00:00 2001 From: liuchang Date: Fri, 12 Jul 2024 01:52:32 +0000 Subject: [PATCH] add modified_time column for compile table while loading json file --- src/json2iris.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/json2iris.c b/src/json2iris.c index bd25dd0..af450b8 100644 --- a/src/json2iris.c +++ b/src/json2iris.c @@ -1027,6 +1027,16 @@ write_compile_line(cJSON *compile, struct iris_description *p_iris, compile_cmd[cmd_cnt].str2int_flag = 1; cmd_cnt++; + compile_cmd[cmd_cnt].json_string = "modified_time"; + compile_cmd[cmd_cnt].json_type = cJSON_String; + compile_cmd[cmd_cnt].empty_allowed = 1; + time_t curr_time; + time(&curr_time); + char *temp = (char *)malloc(21); + snprintf(temp, 21, "%ld", curr_time); + compile_cmd[cmd_cnt].default_string = temp; + cmd_cnt++; + struct iris_table *table_info = NULL; item = cJSON_GetObjectItem(compile,"compile_table_name"); if (NULL == item || item->type != cJSON_String) {