|
|
| version 1.160, 2008/06/26 15:00:42 | version 1.162, 2008/07/04 11:16:51 |
|---|---|
| Line 36 DECLARE_CLASS_VAR(string, new MString, 0 | Line 36 DECLARE_CLASS_VAR(string, new MString, 0 |
| // defines for statics | // defines for statics |
| #define MATCH_VAR_NAME "match" | #define MATCH_VAR_NAME "match" |
| #define TRIM_START_OPTION "start" | #define TRIM_START_OPTION "left" |
| #define TRIM_END_OPTION "right" | |
| #define TRIM_BOTH_OPTION "both" | #define TRIM_BOTH_OPTION "both" |
| #define TRIM_END_OPTION "end" | |
| // statics | // statics |
| Line 479 const String* sql_result_string(Request& | Line 479 const String* sql_result_string(Request& |
| 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++; |
| Line 599 static void _trim(Request& r, MethodPara | Line 594 static void _trim(Request& r, MethodPara |
| const String& skind=params.as_string(0, | const String& skind=params.as_string(0, |
| "'where' must be string"); | "'where' must be string"); |
| if(skind.length()) | if(skind.length()) |
| if(skind==TRIM_START_OPTION) | if(skind==TRIM_BOTH_OPTION) |
| kind=String::TRIM_BOTH; | |
| else if(skind==TRIM_START_OPTION || skind=="start") | |
| kind=String::TRIM_START; | kind=String::TRIM_START; |
| else if(skind==TRIM_END_OPTION) | else if(skind==TRIM_END_OPTION || skind=="end") |
| kind=String::TRIM_END; | kind=String::TRIM_END; |
| else if(skind==TRIM_BOTH_OPTION) | |
| kind=String::TRIM_BOTH; | |
| else | else |
| throw Exception(PARSER_RUNTIME, | throw Exception(PARSER_RUNTIME, |
| &skind, | &skind, |