Exemplo n.º 1
0
        public void TestSetUp()
        {
            var tableInfo = new TableInfo(new ObjectName("test_table"));
            tableInfo.AddColumn("id", PrimitiveTypes.Numeric());
            tableInfo.AddColumn("name", PrimitiveTypes.String());
            tableInfo.AddColumn("date", PrimitiveTypes.DateTime());

            var cornerTime = DateTimeOffset.UtcNow;

            var tmpTable = new TemporaryTable(tableInfo);

            AddRow(tmpTable, 1, "test1", cornerTime);
            AddRow(tmpTable, 2, "test2", cornerTime.AddSeconds(2));
            AddRow(tmpTable, 3, "test3", cornerTime.AddSeconds(5));

            tmpTable.BuildIndexes();

            table = tmpTable;
        }
Exemplo n.º 2
0
        public void TestSetUp()
        {
            var tableName = ObjectName.Parse("APP.test_table");
            var tableInfo = new TableInfo(tableName);
            tableInfo.AddColumn("id", PrimitiveTypes.Numeric(), true);
            tableInfo.AddColumn("name", PrimitiveTypes.String(SqlTypeCode.VarChar));
            tableInfo.AddColumn("date", PrimitiveTypes.DateTime());

            cornerTime = DateTimeOffset.UtcNow;

            var tmpTable = new TemporaryTable(tableInfo);

            AddRow(tmpTable, 1, "test1", cornerTime);
            AddRow(tmpTable, 2, "test2", cornerTime.AddSeconds(2));
            AddRow(tmpTable, 3, "test3", cornerTime.AddSeconds(5));

            tmpTable.BuildIndexes(DefaultIndexTypes.BlindSearch);

            table = tmpTable;
        }