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 123 since _generate_extract_web_arg(columns, [], 0) is ((List(String))list_of_web_arg, (Int) nb_closure),
124 124 //generate the type of the table that contain all components
125 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 132 to_String(list_of_web_arg)+ //all editable components of the type
128 133 " success(\n"+generate_constructor(name, columns, " ")+")\n"+ //generate type construction with values got from web arg
129 134 " "+fill(nb_closure, '}')+ //add close } according to number of web arg
... ... @@ -291,7 +296,7 @@ public define Maybe(One)
291 296 " SQLite3DataBase db,\n"+
292 297 " List(Web_arg) lwa\n"+
293 298 " )=\n"+
294   - " if extract_from_web_arg(lwa) is\n"+
  299 + " if extract_from_web_arg(lwa, \"\") is\n"+
295 300 " {\n"+
296 301 " failure then failure,\n"+
297 302 " success("+name+") then success(update_"+name+"(db, "+name+"))\n"+
... ...