|
|
| version 1.244, 2008/06/26 15:00:42 | version 1.246, 2008/09/03 14:29:17 |
|---|---|
| Line 451 static void _save(Request& r, MethodPara | Line 451 static void _save(Request& r, MethodPara |
| --param_index; | --param_index; |
| const String& file_name=params.as_string(param_index++, FILE_NAME_MUST_NOT_BE_CODE); | const String& file_name=params.as_string(param_index++, FILE_NAME_MUST_NOT_BE_CODE); |
| String file_spec=r.absolute(file_name); | |
| if(do_append && file_exist(file_spec)) | |
| output_column_names=false; | |
| TableSeparators separators; | TableSeparators separators; |
| if(param_index<params.count()) { | if(param_index<params.count()) { |
| Line 515 static void _save(Request& r, MethodPara | Line 519 static void _save(Request& r, MethodPara |
| // write | // write |
| { | { |
| const char* data_cstr=sdata.cstr(); | const char* data_cstr=sdata.cstr(); |
| file_write(r.absolute(file_name), | file_write(file_spec, |
| data_cstr, sdata.length(), true, do_append); | data_cstr, sdata.length(), true, do_append); |
| if(*data_cstr) // not empty (when empty it's not heap memory) | if(*data_cstr) // not empty (when empty it's not heap memory) |
| pa_free((void*)data_cstr); // not needed anymore | pa_free((void*)data_cstr); // not needed anymore |
| Line 566 static void _save(Request& r, MethodPara | Line 570 static void _save(Request& r, MethodPara |
| // write | // write |
| { | { |
| string data=ost.str(); | string data=ost.str(); |
| const char* data_cstr = data.c_str(); | const char* data_cstr=data.c_str(); |
| file_write(r.absolute(file_name), data_cstr, data.length(), true /* as text */, do_append); | file_write(file_spec, data_cstr, data.length(), true /* as text */, do_append); |
| } | } |
| #endif | #endif |
| Line 1129 static void _sql(Request& r, MethodParam | Line 1133 static void _sql(Request& r, MethodParam |
| bind=vbind->get_hash(); | bind=vbind->get_hash(); |
| } | } |
| if(Value* vlimit=options->get(sql_limit_name)) { | if(Value* vlimit=options->get(sql_limit_name)) { |
| if(vlimit->is_defined()){ | valid_options++; |
| valid_options++; | limit=(ulong)r.process_to_value(*vlimit).as_double(); |
| limit=(ulong)r.process_to_value(*vlimit).as_double(); | |
| } else | |
| throw Exception(PARSER_RUNTIME, | |
| 0, | |
| "limit must be defined"); | |
| } | } |
| if(Value* voffset=options->get(sql_offset_name)) { | if(Value* voffset=options->get(sql_offset_name)) { |
| valid_options++; | valid_options++; |