|
|
| version 1.207, 2004/12/23 14:51:31 | version 1.211, 2005/08/26 11:12:45 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b table parser class. | Parser: @b table parser class. |
| Copyright (c) 2001-2004 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| Line 21 static const char * const IDENT_TABLE_C= | Line 21 static const char * const IDENT_TABLE_C= |
| class MTable: public Methoded { | class MTable: public Methoded { |
| public: // VStateless_class | public: // VStateless_class |
| Value* create_new_value(Pool&) { return new VTable(); } | Value* create_new_value(Pool&, HashStringValue&) { return new VTable(); } |
| public: | public: |
| MTable(); | MTable(); |
| Line 477 static void _offset(Request& r, MethodPa | Line 477 static void _offset(Request& r, MethodPa |
| "is invalid whence, valid are 'cur' or 'set'"); | "is invalid whence, valid are 'cur' or 'set'"); |
| } | } |
| Value& offset_expr=params.as_junction(params.count()-1, "offset must be expression"); | int offset=params.as_int(params.count()-1, "offset must be expression", r); |
| table.offset(absolute, r.process_to_value(offset_expr).as_int()); | table.offset(absolute, offset); |
| } else | } else |
| r.write_no_lang(*new VInt(table.current())); | r.write_no_lang(*new VInt(table.current())); |
| } | } |
| Line 981 static void _sql(Request& r, MethodParam | Line 981 static void _sql(Request& r, MethodParam |
| #endif | #endif |
| r.connection()->query( | r.connection()->query( |
| statement_cstr, | statement_cstr, |
| 0, 0, | placeholders_count, placeholders, |
| offset, limit, | offset, limit, |
| handlers, | handlers, |
| statement_string); | statement_string); |