Skip to content

Commit

Permalink
Migrate index table if necessary in getIndex. (#2077)
Browse files Browse the repository at this point in the history
  • Loading branch information
callumbirks authored Jun 24, 2024
1 parent a4effd9 commit 367fc46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LiteCore/Query/SQLiteDataFile+Indexes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ namespace litecore {

// Gets info of a single index. (Subroutine of create/deleteIndex.)
optional<SQLiteIndexSpec> SQLiteDataFile::getIndex(slice name) {
if ( !indexTableExists() ) return nullopt;
ensureIndexTableExists();
SQLite::Statement stmt(*this, "SELECT name, type, expression, keyStore, "
"indexTableName, lastSeq "
"FROM indexes WHERE name=?");
Expand Down

0 comments on commit 367fc46

Please sign in to comment.