Deveel.Data.CreateTableTests.WithIndexedColumn_CustomIndex C# (CSharp) Method

WithIndexedColumn_CustomIndex() private method

private WithIndexedColumn_CustomIndex ( ) : void
return void
        public void WithIndexedColumn_CustomIndex()
        {
            tableName = ObjectName.Parse("APP.test");

            var query = CreateQuery(CreateAdminSession(Database));

            var columns = new SqlTableColumn[] {
                new SqlTableColumn("id", PrimitiveTypes.Integer()),
                new SqlTableColumn("name", PrimitiveTypes.VarChar()) {
                    IndexType = "foo"
                },
            };

            query.CreateTable(tableName, columns);
            query.Commit();

            query = CreateQuery(CreateAdminSession(Database));
            var table = query.Access().GetTable(tableName);

            Assert.IsNotNull(table);
            Assert.AreEqual(2, table.TableInfo.ColumnCount);
        }