summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuchang <[email protected]>2024-07-12 01:52:32 +0000
committerliuchang <[email protected]>2024-07-12 01:52:32 +0000
commite604a066abe00b819b61d95e4164aae9a603143c (patch)
tree73c642fe39cd9ddca4f389eb1fe8936531329652
parent2d77b9c88d951171354c398cb363c04f4e782f91 (diff)
add modified_time column for compile table while loading json file
-rw-r--r--src/json2iris.c10
1 files changed, 10 insertions, 0 deletions
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) {