|
|
| version 1.72, 2001/05/08 06:00:34 | version 1.73, 2001/05/08 06:42:54 |
|---|---|
| Line 242 struct Record_info { | Line 242 struct Record_info { |
| static void store_column_item_to_hash(Array::Item *item, void *info) { | static void store_column_item_to_hash(Array::Item *item, void *info) { |
| Record_info& ri=*static_cast<Record_info *>(info); | Record_info& ri=*static_cast<Record_info *>(info); |
| String& column_name=*static_cast<String *>(item); | String& column_name=*static_cast<String *>(item); |
| const String *column_item=ri.table->item(column_name); | |
| Value *value; | Value *value; |
| if(column_item) | if(const String *column_item=ri.table->item(column_name)) |
| value=new(*ri.pool) VString(*column_item); | value=new(*ri.pool) VString(*column_item); |
| else | else |
| value=new(*ri.pool) VUnknown(*ri.pool); | value=new(*ri.pool) VUnknown(*ri.pool); |
| Line 254 static void _record(Request& r, const St | Line 253 static void _record(Request& r, const St |
| Table& table=static_cast<VTable *>(r.self)->table(); | Table& table=static_cast<VTable *>(r.self)->table(); |
| if(const Array *columns=table.columns()) { | if(const Array *columns=table.columns()) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| Value& value=*new(pool) VHash(pool); | Value& result=*new(pool) VHash(pool); |
| Record_info record_info={&pool, &table, value.get_hash()}; | Record_info record_info={&pool, &table, result.get_hash()}; |
| columns->for_each(store_column_item_to_hash, &record_info); | columns->for_each(store_column_item_to_hash, &record_info); |
| result.set_name(method_name); | |
| r.write_no_lang(value); | r.write_no_lang(result); |
| } | } |
| } | } |