示例#1
0
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            connection.RunAsync(Query.DbCreate("test")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table1")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table2")).Wait();

            testTable        = Query.Db("test").Table <TestObject>("table1");
            anotherTestTable = Query.Db("test").Table <AnotherTestObject>("table2");

            firstNameIndex = anotherTestTable.IndexDefine("index1", o => o.FirstName);
            connection.Run(firstNameIndex.IndexCreate());
            connection.Run(firstNameIndex.IndexWait());

            tagsIndex = testTable.IndexDefineMulti("indexTags", o => o.Tags);
            connection.Run(tagsIndex.IndexCreate());
            connection.Run(tagsIndex.IndexWait());
        }
示例#2
0
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            connection.RunAsync(Query.DbCreate("test")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table1")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table2")).Wait();

            testTable = Query.Db("test").Table<TestObject>("table1");
            anotherTestTable = Query.Db("test").Table<AnotherTestObject>("table2");

            firstNameIndex = anotherTestTable.IndexDefine("index1", o => o.FirstName);
            connection.Run(firstNameIndex.IndexCreate());
            connection.Run(firstNameIndex.IndexWait()).ToArray(); // ToArray ensures that the IEnumerable is actually evaluated completely and the wait is completed

            tagsIndex = testTable.IndexDefineMulti("indexTags", o => o.Tags);
            connection.Run(tagsIndex.IndexCreate());
            connection.Run(tagsIndex.IndexWait()).ToArray(); // ToArray ensures that the IEnumerable is actually evaluated completely and the wait is completed
        }
示例#3
0
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            connection.RunAsync(Query.DbCreate("test")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table1")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table2")).Wait();

            testTable = Query.Db("test").Table<TestObject>("table1");
            anotherTestTable = Query.Db("test").Table<AnotherTestObject>("table2");

            firstNameIndex = anotherTestTable.IndexDefine("index1", o => o.FirstName);
            connection.Run(firstNameIndex.IndexCreate());
            connection.Run(firstNameIndex.IndexWait());

            tagsIndex = testTable.IndexDefineMulti("indexTags", o => o.Tags);
            connection.Run(tagsIndex.IndexCreate());
            connection.Run(tagsIndex.IndexWait());
        }
        public override void TestFixtureSetUp()
        {
            base.TestFixtureSetUp();
            connection.RunAsync(Query.DbCreate("test")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table1")).Wait();
            connection.RunAsync(Query.Db("test").TableCreate("table2")).Wait();

            testTable        = Query.Db("test").Table <TestObject>("table1");
            anotherTestTable = Query.Db("test").Table <AnotherTestObject>("table2");

            firstNameIndex = anotherTestTable.IndexDefine("index1", o => o.FirstName);
            connection.Run(firstNameIndex.IndexCreate());
            connection.Run(firstNameIndex.IndexWait()).ToArray(); // ToArray ensures that the IEnumerable is actually evaluated completely and the wait is completed

            tagsIndex = testTable.IndexDefineMulti("indexTags", o => o.Tags);
            connection.Run(tagsIndex.IndexCreate());
            connection.Run(tagsIndex.IndexWait()).ToArray(); // ToArray ensures that the IEnumerable is actually evaluated completely and the wait is completed
        }