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; }
public boolean Fld_exists(String tbl, String fld) { if (init) Init(engine); Dbmeta_tbl_itm tbl_itm = tbl_mgr.Get_by(tbl); return tbl_itm == null ? false : tbl_itm.Flds().Has(fld); }