public static DmlfColumnRef[] BuildFromArray(string[] cols, DmlfSource source) { return(( from c in cols select new DmlfColumnRef { ColumnName = c, Source = source } ).ToArray()); }
public List <DmlfColumnRef> GetPrimaryKey(DmlfSource src) { var res = new List <DmlfColumnRef>(); foreach (var fld in this) { var col = fld.Column; if (col != null && fld.DisplayInfo.IsPrimaryKey && col.Source == src) { res.Add(col); } } return(res); }
public bool IsMultiTable() { DmlfSource lastsrc = null; foreach (var col in this) { if (col.Source != null) { if (lastsrc != null && col.Source != lastsrc) { return(true); } lastsrc = col.Source; } } return(false); }
public static DmlfResultField BuildFromColumn(string colname, DmlfSource src) { return(new DmlfResultField { Expr = new DmlfColumnRefExpression { Column = new DmlfColumnRef { ColumnName = colname, Source = src, } }, DisplayInfo = new ColumnDisplayInfo { Style = ColumnDisplayInfo.UsageStyle.Value, } }); }