Commit a59686d669e7c54689f063d0c40874248544d219

Authored by David RENÉ
1 parent 2330e5ce

in function from_DB_cursor_to_JSON replace the string NULL by empty string

Showing 1 changed file with 9 additions and 9 deletions   Show diff stats
src/generation/json.anubis
@@ -89,9 +89,9 @@ public define String @@ -89,9 +89,9 @@ public define String
89 { 89 {
90 p_key then "json_member(\""+name+"\", json_int((Int)db_integer"+cursor_index+"))", 90 p_key then "json_member(\""+name+"\", json_int((Int)db_integer"+cursor_index+"))",
91 boolean_field then "json_member(\""+name+"\", json_bool(db_bool"+cursor_index+"))", 91 boolean_field then "json_member(\""+name+"\", json_bool(db_bool"+cursor_index+"))",
92 - date_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",  
93 - time_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",  
94 - datetime_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 92 + date_field(_) then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
  93 + time_field(_) then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
  94 + datetime_field(_) then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
95 foreign_key(app,foreign_table,_,_,_) then 95 foreign_key(app,foreign_table,_,_,_) then
96 " if resolve_fk then\n"+ 96 " if resolve_fk then\n"+
97 " json_member(\""+name+"\", json_string(get_"+foreign_table+"_show_string(db, db_id((Int)db_integer"+cursor_index+"))))\n"+ 97 " json_member(\""+name+"\", json_string(get_"+foreign_table+"_show_string(db, db_id((Int)db_integer"+cursor_index+"))))\n"+
@@ -99,13 +99,13 @@ public define String @@ -99,13 +99,13 @@ public define String
99 " json_member(\""+name+"\", json_int((Int)db_integer"+cursor_index+"))", 99 " json_member(\""+name+"\", json_int((Int)db_integer"+cursor_index+"))",
100 integer_field(_) then "json_member(\""+name+"\", json_int((Int)db_integer"+cursor_index+"))", 100 integer_field(_) then "json_member(\""+name+"\", json_int((Int)db_integer"+cursor_index+"))",
101 float_field then "json_member(\""+name+"\", json_float(db_float"+cursor_index+",5))", 101 float_field then "json_member(\""+name+"\", json_float(db_float"+cursor_index+",5))",
102 - char_field(_,_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 102 + char_field(_,_) then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
103 password_field(_) then "json_member(\""+name+"\", json_string(\"******\"))", 103 password_field(_) then "json_member(\""+name+"\", json_string(\"******\"))",
104 - text_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",  
105 - color_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",  
106 - phone_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 104 + text_field(_) then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
  105 + color_field then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
  106 + phone_field(_) then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
107 // mobile_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", 107 // mobile_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",
108 - url_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))",  
109 - email_field then "json_member(\""+name+"\", json_string(text"+cursor_index+"))" 108 + url_field then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))",
  109 + email_field then "json_member(\""+name+"\", json_string(not_null_String(text"+cursor_index+")))"
110 } 110 }
111 . 111 .