private IndexSpec[] GetIndexSpecsFromDb(String soupName) { ISQLiteStatement statement = Query(SmartStore.SoupIndexMapTable, new[] { SmartStore.PathCol, SmartStore.ColumnNameCol, SmartStore.ColumnTypeCol }, null, null, SmartStore.SoupNamePredicate, soupName); if (statement.DataCount < 1) { throw new SmartStoreException(String.Format("{0} does not have any indices", soupName)); } var indexSpecs = new List <IndexSpec>(); do { String path = statement.GetText(SmartStore.PathCol); String columnName = statement.GetText(SmartStore.ColumnNameCol); var columnType = new SmartStoreType(statement.GetText(SmartStore.ColumnTypeCol)); indexSpecs.Add(new IndexSpec(path, columnType, columnName)); } while (statement.Step() == SQLiteResult.ROW); statement.ResetAndClearBindings(); return(indexSpecs.ToArray()); }
protected IndexSpec[] GetIndexSpecsFromDb(String soupName) { SQLiteStatement statement = Query(SmartStore.SoupIndexMapTable, new[] { SmartStore.PathCol, SmartStore.ColumnNameCol, SmartStore.ColumnTypeCol }, null, null, SmartStore.SoupNamePredicate, soupName); if (statement.DataCount < 1) { return(new IndexSpec[] { }); } var indexSpecs = new List <IndexSpec>(); do { String path = statement.GetText(SmartStore.PathCol); String columnName = statement.GetText(SmartStore.ColumnNameCol); var columnType = new SmartStoreType(statement.GetText(SmartStore.ColumnTypeCol)); indexSpecs.Add(new IndexSpec(path, columnType, columnName)); } while (statement.Step() == SQLiteResult.ROW); statement.ResetAndClearBindings(); return(indexSpecs.ToArray()); }
public IndexSpec(String path, SmartStoreType type, String columnName) { Path = path; SmartType = type; ColumnName = columnName; }
public IndexSpec(String path, SmartStoreType type) { Path = path; SmartType = type; ColumnName = null; // undefined }
public IndexSpec(String path, SmartStoreType type, String columnName) { Path = path; SmartType = type; ColumnName = columnName; }
public IndexSpec(String path, SmartStoreType type) { Path = path; SmartType = type; ColumnName = null; // undefined }
private IndexSpec[] GetIndexSpecsFromDb(String soupName) { ISQLiteStatement statement = Query(SmartStore.SoupIndexMapTable, new[] { SmartStore.PathCol, SmartStore.ColumnNameCol, SmartStore.ColumnTypeCol }, null, null, SmartStore.SoupNamePredicate, soupName); if (statement.DataCount < 1) { throw new SmartStoreException(String.Format("{0} does not have any indices", soupName)); } var indexSpecs = new List<IndexSpec>(); do { String path = statement.GetText(SmartStore.PathCol); String columnName = statement.GetText(SmartStore.ColumnNameCol); var columnType = new SmartStoreType(statement.GetText(SmartStore.ColumnTypeCol)); indexSpecs.Add(new IndexSpec(path, columnType, columnName)); } while (statement.Step() == SQLiteResult.ROW); statement.ResetAndClearBindings(); return indexSpecs.ToArray(); }