|
|
| version 1.378, 2024/12/11 15:46:38 | version 1.381, 2025/05/27 15:10:24 |
|---|---|
| Line 849 static void table_row_to_hash(Table::ele | Line 849 static void table_row_to_hash(Table::ele |
| for(Array_iterator<int> i(*info->value_fields); i; ) { | for(Array_iterator<int> i(*info->value_fields); i; ) { |
| size_t value_field=i.next(); | size_t value_field=i.next(); |
| if(value_field<row->count()) | if(value_field<row->count()) |
| hash.put(columns ? *columns->get(value_field) : String(pa_uitoa(value_field)), new VString(*row->get(value_field))); | hash.put(columns ? *columns->get(value_field) : String::Body::uitoa(value_field), new VString(*row->get(value_field))); |
| } | } |
| } else { // all fields | } else { // all fields |
| for(size_t index=0; index<row->count(); index++) { | for(size_t index=0; index<row->count(); index++) { |
| hash.put(columns && index < columns->count() ? *columns->get(index) : String(pa_uitoa(index)), new VString(*row->get(index))); | hash.put(columns && index < columns->count() ? *columns->get(index) : String::Body::uitoa(index), new VString(*row->get(index))); |
| } | } |
| } | } |
| exist=info->hash->put_dont_replace(*key, vhash); | exist=info->hash->put_dont_replace(*key, vhash); |
| Line 1071 static void _cells(Request& r, MethodPar | Line 1071 static void _cells(Request& r, MethodPar |
| size_t row_size=self_table[self_table.current()]->count(); // number of columns in current row | size_t row_size=self_table[self_table.current()]->count(); // number of columns in current row |
| if(params.count()){ | if(params.count()){ |
| int limit=params.as_int(params.count()-1, "offset must be expression", r); | int limit=params.as_int(params.count()-1, "limit must be expression", r); |
| if(limit<0) | if(limit<0) |
| limit=0; | limit=0; |
| if((size_t)limit<row_size) | if((size_t)limit<row_size) |
| Line 1439 void unmarshal_bind_updates(HashStringVa | Line 1439 void unmarshal_bind_updates(HashStringVa |
| if(ph->is_null) | if(ph->is_null) |
| value=VVoid::get(); | value=VVoid::get(); |
| else | else |
| value=new VString(*new String(ph->value, String::L_TAINTED)); | value=new VString(ph->value); |
| hash.put(ph->name, value); | hash.put(ph->name, value); |
| } | } |
| } | } |