|
|
| version 1.342, 2017/02/07 22:00:30 | version 1.345, 2017/12/03 23:36:23 |
|---|---|
| Line 17 | Line 17 |
| #include "pa_vbool.h" | #include "pa_vbool.h" |
| #include "pa_array.h" | #include "pa_array.h" |
| #if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4)) | #if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4) && !defined(PA_DEBUG_DISABLE_GC)) |
| #include <sstream> | #include <sstream> |
| #define USE_STRINGSTREAM | #define USE_STRINGSTREAM |
| #endif | #endif |
| Line 1016 static void _hash(Request& r, MethodPara | Line 1016 static void _hash(Request& r, MethodPara |
| } | } |
| #ifndef DOXYGEN | #ifndef DOXYGEN |
| struct Table_seq_item { | struct Table_seq_item : public PA_Allocated { |
| ArrayString* row; | ArrayString* row; |
| union { | union { |
| const char *c_str; | const char *c_str; |
| Line 1048 static void _sort(Request& r, MethodPara | Line 1048 static void _sort(Request& r, MethodPara |
| Table& old_table=GET_SELF(r, VTable).table(); | Table& old_table=GET_SELF(r, VTable).table(); |
| Table& new_table=*new Table(old_table.columns()); | Table& new_table=*new Table(old_table.columns()); |
| Table_seq_item* seq=new(PointerFreeGC) Table_seq_item[old_table.count()]; | Table_seq_item* seq=new Table_seq_item[old_table.count()]; |
| int i; | int i; |
| // calculate key values | // calculate key values |
| Line 1299 public: | Line 1299 public: |
| columns+=new String(str, String::L_TAINTED /* no length as 0x00 can be inside */); | columns+=new String(str, String::L_TAINTED /* no length as 0x00 can be inside */); |
| return false; | return false; |
| } catch(...) { | } catch(...) { |
| error=SQL_Error("exception occured in Table_sql_event_handlers::add_column"); | error=SQL_Error("exception occurred in Table_sql_event_handlers::add_column"); |
| return true; | return true; |
| } | } |
| } | } |
| Line 1309 public: | Line 1309 public: |
| columns_count=columns.count(); | columns_count=columns.count(); |
| return false; | return false; |
| } catch(...) { | } catch(...) { |
| error=SQL_Error("exception occured in Table_sql_event_handlers::before_rows"); | error=SQL_Error("exception occurred in Table_sql_event_handlers::before_rows"); |
| return true; | return true; |
| } | } |
| } | } |
| Line 1318 public: | Line 1318 public: |
| *table+=row=new ArrayString(columns_count); | *table+=row=new ArrayString(columns_count); |
| return false; | return false; |
| } catch(...) { | } catch(...) { |
| error=SQL_Error("exception occured in Table_sql_event_handlers::add_row"); | error=SQL_Error("exception occurred in Table_sql_event_handlers::add_row"); |
| return true; | return true; |
| } | } |
| } | } |
| Line 1327 public: | Line 1327 public: |
| *row+=str?new String(str, String::L_TAINTED /* no length as 0x00 can be inside */):&String::Empty; | *row+=str?new String(str, String::L_TAINTED /* no length as 0x00 can be inside */):&String::Empty; |
| return false; | return false; |
| } catch(...) { | } catch(...) { |
| error=SQL_Error("exception occured in Table_sql_event_handlers::add_row_cell"); | error=SQL_Error("exception occurred in Table_sql_event_handlers::add_row_cell"); |
| return true; | return true; |
| } | } |
| } | } |
| Line 1351 static void marshal_bind( | Line 1351 static void marshal_bind( |
| // not static, used elsewhere | // not static, used elsewhere |
| int marshal_binds(HashStringValue& hash, SQL_Driver::Placeholder*& placeholders) { | int marshal_binds(HashStringValue& hash, SQL_Driver::Placeholder*& placeholders) { |
| int hash_count=hash.count(); | int hash_count=hash.count(); |
| placeholders=new SQL_Driver::Placeholder[hash_count]; | placeholders=new(PointerGC) SQL_Driver::Placeholder[hash_count]; |
| SQL_Driver::Placeholder* ptr=placeholders; | SQL_Driver::Placeholder* ptr=placeholders; |
| hash.for_each<SQL_Driver::Placeholder**>(marshal_bind, &ptr); | hash.for_each<SQL_Driver::Placeholder**>(marshal_bind, &ptr); |
| return hash_count; | return hash_count; |