示例#1
0
 private void Select_rows_where(List_adp rv, Mem_stmt stmt, Criteria crt) {
   rv.Clear();
   int rows_len = rows.Count();
   for (int i = 0; i < rows_len; ++i) {
     Mem_row itm = (Mem_row) rows.Get_at(i);
     if (crt.Matches(itm)) rv.Add(itm);
   }
 }
示例#2
0
 public int Insert(Mem_stmt stmt) {
   Mem_row itm = new Mem_row();
   Dbmeta_fld_mgr flds = meta.Flds();
   int len = flds.Len();
   for (int i = 0; i < len; ++i) {
     Dbmeta_fld_itm fld = flds.Get_at(i);
     String fld_name = fld.Name();
     Object val = fld.Autonum() ? Autonum_calc(fld_name) : stmt.Args_get_by(fld_name);
     if (val == null) continue; // NOTE: allow Bulk_insert from test to skip filds
     itm.Set_by(fld_name, val);
   }
   rows.Add(itm);
   return 1;
 }