示例#1
0
        public void TestTableIndexesFromTableNameEnumerable()
        {
            string           indexname = "myindex";
            string           indexdef  = "+ascii\0\0";
            CreateIndexGrbit grbit     = CreateIndexGrbit.IndexUnique;

            Api.JetBeginTransaction(this.sesid);
            Api.JetCreateIndex(this.sesid, this.tableid, indexname, grbit, indexdef, indexdef.Length, 100);
            EnumerableTests.TestEnumerable(Api.GetTableIndexes(this.sesid, this.dbid, this.table));

            Api.JetRollback(this.sesid, RollbackTransactionGrbit.None);
        }
        public void TestIntersectIndexesEnumerable()
        {
            JET_TABLEID tableid1 = this.OpenTable();
            JET_TABLEID tableid2 = this.OpenTable();

            Api.JetSetCurrentIndex(this.sesid, tableid1, "index1");
            this.SetIndexRange(tableid1, 8, 9);

            Api.JetSetCurrentIndex(this.sesid, tableid2, "index2");
            this.SetIndexRange(tableid2, 1, 2);

            var tableids = new[] { tableid1, tableid2 };

            EnumerableTests.TestEnumerable(Api.IntersectIndexes(this.sesid, tableids));
        }
示例#3
0
 public void TestTableColumnsFromTableNameEnumerable()
 {
     EnumerableTests.TestEnumerable(Api.GetTableColumns(this.sesid, this.dbid, this.table));
 }
示例#4
0
 public void TestTableNamesEnumerable()
 {
     EnumerableTests.TestEnumerable(Api.GetTableNames(this.sesid, this.dbid));
 }