Commit 917dd6658d7c05e26c3aec56723dcf901a3db522

Authored by Julien Verneuil
1 parent 04ea8a8d

add prefix parameter to "extract_from_web_args" generated function (for now empty)

Showing 1 changed file with 7 additions and 2 deletions   Show diff stats
src/generation/types.anubis
@@ -123,7 +123,12 @@ public define Maybe(One) @@ -123,7 +123,12 @@ public define Maybe(One)
123 since _generate_extract_web_arg(columns, [], 0) is ((List(String))list_of_web_arg, (Int) nb_closure), 123 since _generate_extract_web_arg(columns, [], 0) is ((List(String))list_of_web_arg, (Int) nb_closure),
124 //generate the type of the table that contain all components 124 //generate the type of the table that contain all components
125 if write_string(stream, 125 if write_string(stream,
126 - "\n\ndefine Maybe("+type_name+")\n extract_from_web_arg\n (\n List(Web_arg) lwa\n )=\n"+ //head of the definition 126 + "\n\ndefine Maybe("+type_name+")\n"+
  127 + " extract_from_web_arg\n"+
  128 + " (\n"+
  129 + " List(Web_arg) lwa,\n"+
  130 + " String prefix\n"+
  131 + " )=\n"+ //head of the definition
127 to_String(list_of_web_arg)+ //all editable components of the type 132 to_String(list_of_web_arg)+ //all editable components of the type
128 " success(\n"+generate_constructor(name, columns, " ")+")\n"+ //generate type construction with values got from web arg 133 " success(\n"+generate_constructor(name, columns, " ")+")\n"+ //generate type construction with values got from web arg
129 " "+fill(nb_closure, '}')+ //add close } according to number of web arg 134 " "+fill(nb_closure, '}')+ //add close } according to number of web arg
@@ -291,7 +296,7 @@ public define Maybe(One) @@ -291,7 +296,7 @@ public define Maybe(One)
291 " SQLite3DataBase db,\n"+ 296 " SQLite3DataBase db,\n"+
292 " List(Web_arg) lwa\n"+ 297 " List(Web_arg) lwa\n"+
293 " )=\n"+ 298 " )=\n"+
294 - " if extract_from_web_arg(lwa) is\n"+ 299 + " if extract_from_web_arg(lwa, \"\") is\n"+
295 " {\n"+ 300 " {\n"+
296 " failure then failure,\n"+ 301 " failure then failure,\n"+
297 " success("+name+") then success(update_"+name+"(db, "+name+"))\n"+ 302 " success("+name+") then success(update_"+name+"(db, "+name+"))\n"+