|
|
| version 1.35, 2002/02/08 08:30:10 | version 1.38, 2002/04/15 12:03:31 |
|---|---|
| Line 57 public: | Line 57 public: |
| } | } |
| void before_rows() { | void before_rows() { |
| if(columns.size()<=1) | if(columns.size()<=1) |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &method_name, | &method_name, |
| "column count must be more than 1 to create a hash"); | "column count must be more than 1 to create a hash"); |
| } | } |
| Line 206 static void _sql(Request& r, const Strin | Line 206 static void _sql(Request& r, const Strin |
| if(voptions.is_defined()) | if(voptions.is_defined()) |
| if(Hash *options=voptions.get_hash(&method_name)) { | if(Hash *options=voptions.get_hash(&method_name)) { |
| if(Value *vlimit=(Value *)options->get(*sql_limit_name)) | if(Value *vlimit=(Value *)options->get(*sql_limit_name)) |
| limit=(ulong)r.process(*vlimit).as_double(); | limit=(ulong)r.process_to_value(*vlimit).as_double(); |
| if(Value *voffset=(Value *)options->get(*sql_offset_name)) | if(Value *voffset=(Value *)options->get(*sql_offset_name)) |
| offset=(ulong)r.process(*voffset).as_double(); | offset=(ulong)r.process_to_value(*voffset).as_double(); |
| } else | } else |
| throw Exception(0, 0, | throw Exception("parser.runtime", |
| &method_name, | &method_name, |
| "options must be hash"); | "options must be hash"); |
| } | } |
| Temp_lang temp_lang(r, String::UL_SQL); | Temp_lang temp_lang(r, String::UL_SQL); |
| const String& statement_string=r.process(statement).as_string(); | const String& statement_string=r.process_to_string(statement); |
| const char *statement_cstr= | const char *statement_cstr= |
| statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name)); | statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name)); |
| Hash& hash=static_cast<VHash *>(r.self)->hash(&method_name); | Hash& hash=static_cast<VHash *>(r.self)->hash(&method_name); |
| Line 286 static void one_foreach_cycle(const Hash | Line 286 static void one_foreach_cycle(const Hash |
| i.r->root->put_element(*i.key_var_name, i.vkey); | i.r->root->put_element(*i.key_var_name, i.vkey); |
| i.r->root->put_element(*i.value_var_name, static_cast<Value *>(avalue)); | i.r->root->put_element(*i.value_var_name, static_cast<Value *>(avalue)); |
| Value& processed_body=i.r->process(*i.body_code); | StringOrValue processed_body=i.r->process(*i.body_code); |
| if(i.delim_maybe_code) { // delimiter set? | if(i.delim_maybe_code) { // delimiter set? |
| const String *string=processed_body.get_string(); | const String *string=processed_body.get_string(); |
| if(i.need_delim && string && string->size()) // need delim & iteration produced string? | if(i.need_delim && string && string->size()) // need delim & iteration produced string? |