merge: quick/fix-table-expanded-where — fix Expand table no abria ventana

This commit is contained in:
2026-05-01 02:04:11 +02:00
+3 -1
View File
@@ -1629,9 +1629,11 @@ void views_table_windows_sync(AppState& app, const char* ops_db) {
if (db) sqlite3_close(db);
return;
}
// json_extract devuelve INTEGER 1 para JSON true; comparamos contra 1
// (json('true') no es comparable directo — devuelve TEXT 'true').
const char* sql =
"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;
if (sqlite3_prepare_v2(db, sql, -1, &st, nullptr) != SQLITE_OK) {
sqlite3_close(db);