Exemple #1
0
 public static DmlfColumnRef[] BuildFromArray(string[] cols, DmlfSource source)
 {
     return((
                from c in cols select new DmlfColumnRef {
         ColumnName = c, Source = source
     }
                ).ToArray());
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 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,
         }
     });
 }