Пример #1
0
        public static void AliasTableInfo()
        {
            var tableName = new ObjectName("tab1");
            var tableInfo = new TableInfo(tableName);

            tableInfo.Columns.Add(new ColumnInfo("a", PrimitiveTypes.BigInt()));
            tableInfo.Columns.Add(new ColumnInfo("b", PrimitiveTypes.VarChar(22)));

            var alias   = new ObjectName("alias1");
            var aliased = tableInfo.As(alias);

            Assert.NotEqual(tableName, aliased.TableName);
            Assert.Equal(aliased.Columns.Count, tableInfo.Columns.Count);
        }
Пример #2
0
 public TemporaryTable(TableInfo tableInfo, ObjectName alias)
     : this(tableInfo.As(alias))
 {
 }