|
|
| version 1.53, 2001/05/21 16:38:46 | version 1.55, 2001/05/21 17:11:57 |
|---|---|
| Line 24 | Line 24 |
| // class | // class |
| class MString : public Methoded { | class MString : public Methoded { |
| public: // VStateless_class | |
| Value *create_new_value(Pool& pool) { return new(pool) VString(pool); } | |
| public: | public: |
| MString(Pool& pool); | MString(Pool& pool); |
| public: // Methoded | public: // Methoded |
| Line 294 String& sql_result_string(Request& r, co | Line 291 String& sql_result_string(Request& r, co |
| if(sql_column_count!=1) | if(sql_column_count!=1) |
| PTHROW(0, 0, | PTHROW(0, 0, |
| &statement_string, | &statement_string, |
| "result must contain only one column"); | "result must contain only exactly column"); |
| if(sql_row_count!=1) | if(sql_row_count!=1) |
| PTHROW(0, 0, | PTHROW(0, 0, |
| &statement_string, | &statement_string, |
| "result must contain only one row"); | "result must contain only exactly row"); |
| String& result=*new(pool) String(pool); | String& result=*new(pool) String(pool); |
| SQL_Driver::Cell& cell=sql_rows[0][0]; | SQL_Driver::Cell& cell=sql_rows[0][0]; |
| Line 362 MString::MString(Pool& apool) : Methoded | Line 359 MString::MString(Pool& apool) : Methoded |
| // ^string:sql[query] | // ^string:sql[query] |
| // ^string:sql[query](offset) | // ^string:sql[query](offset) |
| add_native_method("sql", Method::CT_DYNAMIC, _sql, 1, 2); | add_native_method("sql", Method::CT_STATIC, _sql, 1, 2); |
| } | } |
| // global variable | // global variable |