|
|
| version 1.133, 2001/11/22 15:47:12 | version 1.134, 2001/11/23 12:56:37 |
|---|---|
| Line 38 public: // Methoded | Line 38 public: // Methoded |
| static void _set(Request& r, const String& method_name, MethodParams *params) { | static void _set(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| // data is last parameter | // data is last parameter |
| Value& vdata=params->as_junction(params->size()-1, "body must be code"); | |
| Temp_lang temp_lang(r, String::UL_PASS_APPENDED); | Temp_lang temp_lang(r, String::UL_PASS_APPENDED); |
| const String& data=r.process(vdata).as_string(); | const String& data= |
| r.process(params->as_junction(params->size()-1, "body must be code")).as_string(); | |
| size_t pos_after=0; | size_t pos_after=0; |
| // parse columns | // parse columns |
| Line 212 static void _offset(Request& r, const St | Line 211 static void _offset(Request& r, const St |
| if(params->size()>1) { | if(params->size()>1) { |
| const String& whence=params->as_string(0, "whence must be string"); | const String& whence=params->as_string(0, "whence must be string"); |
| if(whence=="cur") | if(whence=="cur") |
| absolute=false; | absolute=false; |
| else if(whence=="set") | else if(whence=="set") |
| absolute=true; | absolute=true; |
| else | else |
| throw Exception(0, 0, | throw Exception(0, 0, |
| &whence, | &whence, |
| "is invalid whence, valid are 'cur' or 'set'"); | "is invalid whence, valid are 'cur' or 'set'"); |
| } | } |
| Value& offset_expr=params->as_junction(params->size()-1, "offset must be expression"); | Value& offset_expr=params->as_junction(params->size()-1, "offset must be expression"); |
| table.offset(absolute, r.process(offset_expr).as_int()); | table.offset(absolute, r.process(offset_expr).as_int()); |
| Line 427 static void _flip(Request& r, const Stri | Line 425 static void _flip(Request& r, const Stri |
| static void _append(Request& r, const String& method_name, MethodParams *params) { | static void _append(Request& r, const String& method_name, MethodParams *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| // data is last parameter | // data |
| Temp_lang temp_lang(r, String::UL_PASS_APPENDED); | |
| const String& string= | const String& string= |
| r.process(params->as_junction(0, "body must be code")).as_string(); | r.process(params->as_junction(0, "body must be code")).as_string(); |
| Line 481 public: | Line 480 public: |
| statement_string(astatement_string), | statement_string(astatement_string), |
| statement_cstr(astatement_cstr), | statement_cstr(astatement_cstr), |
| columns(*new(pool) Array(pool)), | columns(*new(pool) Array(pool)), |
| row(0), row_index(0), | row(0), |
| table(0) | table(0) |
| { | { |
| } | } |
| Line 504 public: | Line 503 public: |
| if(size) | if(size) |
| cell->APPEND_TAINTED( | cell->APPEND_TAINTED( |
| (const char *)ptr, size, | (const char *)ptr, size, |
| statement_cstr, row_index++); | statement_cstr, table->size()-1); |
| (*row)+=cell; | (*row)+=cell; |
| } | } |
| Line 514 private: | Line 513 private: |
| const String& statement_string; const char *statement_cstr; | const String& statement_string; const char *statement_cstr; |
| Array& columns; | Array& columns; |
| Array *row; | Array *row; |
| uint row_index; | |
| public: | public: |
| Table *table; | Table *table; |
| }; | }; |