コード例 #1
0
 /// <summary>
 ///     Create syncs soup if needed.
 /// </summary>
 /// <param name="store"></param>
 public static void SetupSyncsSoupIfNeeded(SmartStore.Store.SmartStore store)
 {
     if (store.HasSoup(Constants.SyncsSoup))
     {
         return;
     }
     IndexSpec[] indexSpecs = {new IndexSpec(Constants.SyncType, SmartStoreType.SmartString)};
     store.RegisterSoup(Constants.SyncsSoup, indexSpecs);
 }
コード例 #2
0
 public void TestDeleteDb()
 {
     Assert.AreEqual("select TABLE_1_0, TABLE_1_1 from TABLE_1 order by TABLE_1_1",
                     Store.ConvertSmartSql(
                         "select {employees:firstName}, {employees:lastName} from {employees} order by {employees:lastName}"));
     SmartStore.DeleteAllDatabases(true);
     try
     {
         Store.HasSoup(DEPARTMENTS_SOUP);
         Assert.Fail("Table exists");
     }
     catch (SQLiteException)
     {
         // we're good, table doesn't exist
     }
     finally
     {
         SetupData();
     }
 }