Diff for /parser3/src/classes/table.C between versions 1.136 and 1.138

version 1.136, 2001/12/15 21:28:18 version 1.138, 2002/01/16 10:28:34
Line 50  static void _set(Request& r, const Strin Line 50  static void _set(Request& r, const Strin
                 columns=new(pool) Array(pool);                  columns=new(pool) Array(pool);
   
                 Array head(pool);                  Array head(pool);
                 data.split(head, &pos_after, "\n", 1, String::UL_CLEAN, 1);                  data.split(head, &pos_after, "\n", 1, String::UL_AS_IS, 1);
                 if(head.size())                  if(head.size())
                         head.get_string(0)->split(*columns, 0, "\t", 1, String::UL_CLEAN);                          head.get_string(0)->split(*columns, 0, "\t", 1, String::UL_AS_IS);
         }          }
   
         Table& table=*new(pool) Table(pool, &method_name, columns);          Table& table=*new(pool) Table(pool, &method_name, columns);
         // parse cells          // parse cells
         Array rows(pool);          Array rows(pool);
         data.split(rows, &pos_after, "\n", 1, String::UL_CLEAN);          data.split(rows, &pos_after, "\n", 1, String::UL_AS_IS);
         Array_iter i(rows);          Array_iter i(rows);
         while(i.has_next()) {          while(i.has_next()) {
                 Array& row=*new(pool) Array(pool);                  Array& row=*new(pool) Array(pool);
Line 67  static void _set(Request& r, const Strin Line 67  static void _set(Request& r, const Strin
                 if(!string.size())                  if(!string.size())
                         continue;                          continue;
   
                 string.split(row, 0, "\t", 1, String::UL_CLEAN);                  string.split(row, 0, "\t", 1, String::UL_AS_IS);
                 table+=&row;                  table+=&row;
         }          }
   
Line 431  static void _append(Request& r, const St Line 431  static void _append(Request& r, const St
   
         // parse cells          // parse cells
         Array& row=*new(pool) Array(pool);          Array& row=*new(pool) Array(pool);
         string.split(row, 0, "\t", 1, String::UL_CLEAN);          string.split(row, 0, "\t", 1, String::UL_AS_IS);
   
         VTable& vtable=*static_cast<VTable *>(r.self);          VTable& vtable=*static_cast<VTable *>(r.self);
         vtable.table()+=&row;          vtable.table()+=&row;
Line 519  public: Line 519  public:
 static void _sql(Request& r, const String& method_name, MethodParams *params) {  static void _sql(Request& r, const String& method_name, MethodParams *params) {
         Pool& pool=r.pool();          Pool& pool=r.pool();
   
         if(!r.connection)  
                 throw Exception(0, 0,   
                         &method_name,   
                         "without connect");  
   
         Value& statement=params->as_junction(0, "statement must be code");          Value& statement=params->as_junction(0, "statement must be code");
   
         ulong limit=0;          ulong limit=0;
Line 545  static void _sql(Request& r, const Strin Line 540  static void _sql(Request& r, const Strin
         Temp_lang temp_lang(r, String::UL_SQL);          Temp_lang temp_lang(r, String::UL_SQL);
         const String& statement_string=r.process(statement).as_string();          const String& statement_string=r.process(statement).as_string();
         const char *statement_cstr=          const char *statement_cstr=
                 statement_string.cstr(String::UL_UNSPECIFIED, r.connection);                  statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name));
         Table_sql_event_handlers handlers(pool, method_name,          Table_sql_event_handlers handlers(pool, method_name,
                 statement_string, statement_cstr);                  statement_string, statement_cstr);
         try {          try {
Line 554  static void _sql(Request& r, const Strin Line 549  static void _sql(Request& r, const Strin
         //measure:before          //measure:before
         gettimeofday(&mt[0],NULL);          gettimeofday(&mt[0],NULL);
 #endif    #endif  
                 r.connection->query(                  r.connection(&method_name)->query(
                         statement_cstr, offset, limit,                           statement_cstr, offset, limit, 
                         handlers);                          handlers);
                   

Removed from v.1.136  
changed lines
  Added in v.1.138


E-mail: