|
|
| version 1.306, 2015/07/28 14:42:44 | version 1.308, 2015/08/02 21:21:25 |
|---|---|
| Line 804 static void table_row_to_hash(Table::ele | Line 804 static void table_row_to_hash(Table::ele |
| table=new Table(*info->table, table_options/*no rows, just structure*/); | table=new Table(*info->table, table_options/*no rows, just structure*/); |
| info->hash->put(*key, new VTable(table)); | info->hash->put(*key, new VTable(table)); |
| } | } |
| *table+=row; | Table::element_type row_copy(new ArrayString(row->count())); |
| row_copy->append(*row); | |
| *table+=row_copy; | |
| break; | break; |
| } | } |
| } | } |
| Line 1162 static void _insert(Request& r, MethodPa | Line 1164 static void _insert(Request& r, MethodPa |
| table.insert(table.current(), row); | table.insert(table.current(), row); |
| } | } |
| static void _delete(Request& r, MethodParams& params) { | |
| Table& table=GET_SELF(r, VTable).table(); | |
| table.remove_current(); | |
| } | |
| static void join_named_row(Table& src, Table* dest) { | static void join_named_row(Table& src, Table* dest) { |
| Table::columns_type dest_columns=dest->columns(); | Table::columns_type dest_columns=dest->columns(); |
| size_t dest_columns_count=dest_columns->count(); | size_t dest_columns_count=dest_columns->count(); |
| Line 1488 MTable::MTable(): Methoded("table") { | Line 1495 MTable::MTable(): Methoded("table") { |
| // ^table.insert{row{tab}data} before current row | // ^table.insert{row{tab}data} before current row |
| add_native_method("insert", Method::CT_DYNAMIC, _insert, 1, 1); | add_native_method("insert", Method::CT_DYNAMIC, _insert, 1, 1); |
| // ^table.delete[] current row | |
| add_native_method("delete", Method::CT_DYNAMIC, _delete, 0, 0); | |
| // ^table.join[table][$.limit(10) $.offset(1) $.offset[cur] ] | // ^table.join[table][$.limit(10) $.offset(1) $.offset[cur] ] |
| add_native_method("join", Method::CT_DYNAMIC, _join, 1, 2); | add_native_method("join", Method::CT_DYNAMIC, _join, 1, 2); |