merge: quick/fix-table-expanded-where — fix Expand table no abria ventana
This commit is contained in:
@@ -1629,9 +1629,11 @@ void views_table_windows_sync(AppState& app, const char* ops_db) {
|
|||||||
if (db) sqlite3_close(db);
|
if (db) sqlite3_close(db);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// json_extract devuelve INTEGER 1 para JSON true; comparamos contra 1
|
||||||
|
// (json('true') no es comparable directo — devuelve TEXT 'true').
|
||||||
const char* sql =
|
const char* sql =
|
||||||
"SELECT id FROM entities "
|
"SELECT id FROM entities "
|
||||||
"WHERE type_ref = 'Table' AND json_extract(metadata,'$.expanded') = json('true')";
|
"WHERE type_ref = 'Table' AND json_extract(metadata,'$.expanded') = 1";
|
||||||
sqlite3_stmt* st = nullptr;
|
sqlite3_stmt* st = nullptr;
|
||||||
if (sqlite3_prepare_v2(db, sql, -1, &st, nullptr) != SQLITE_OK) {
|
if (sqlite3_prepare_v2(db, sql, -1, &st, nullptr) != SQLITE_OK) {
|
||||||
sqlite3_close(db);
|
sqlite3_close(db);
|
||||||
|
|||||||
Reference in New Issue
Block a user