mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Allow "getting" and setting case_sensitive_like pragma (#1494)
* Allow "getting" and setting case_sensitive_like pragma In order to allow case insensitive filtering, the pragma case_sensitive_like is added to the GUI. Given that this pragma cannot be read, a special SELECT request is made in DBBrowserDB::getPragma for inferring its value. See issue #1489. * Warning in the pragma case_sensitive_like This pragma has some peculiarities, so it is convenient to warn the user about it through a tool-tip in the value.
This commit is contained in:
@@ -1881,6 +1881,7 @@ void MainWindow::loadPragmas()
|
||||
pragmaValues.temp_store = db.getPragma("temp_store").toInt();
|
||||
pragmaValues.user_version = db.getPragma("user_version").toInt();
|
||||
pragmaValues.wal_autocheckpoint = db.getPragma("wal_autocheckpoint").toInt();
|
||||
pragmaValues.case_sensitive_like = db.getPragma("case_sensitive_like").toInt();
|
||||
|
||||
updatePragmaUi();
|
||||
}
|
||||
@@ -1904,6 +1905,7 @@ void MainWindow::updatePragmaUi()
|
||||
ui->comboboxPragmaTempStore->setCurrentIndex(pragmaValues.temp_store);
|
||||
ui->spinPragmaUserVersion->setValue(pragmaValues.user_version);
|
||||
ui->spinPragmaWalAutoCheckpoint->setValue(pragmaValues.wal_autocheckpoint);
|
||||
ui->checkboxPragmaCaseSensitiveLike->setChecked(pragmaValues.case_sensitive_like);
|
||||
}
|
||||
|
||||
void MainWindow::savePragmas()
|
||||
@@ -1933,6 +1935,7 @@ void MainWindow::savePragmas()
|
||||
db.setPragma("temp_store", ui->comboboxPragmaTempStore->currentIndex(), pragmaValues.temp_store);
|
||||
db.setPragma("user_version", ui->spinPragmaUserVersion->value(), pragmaValues.user_version);
|
||||
db.setPragma("wal_autocheckpoint", ui->spinPragmaWalAutoCheckpoint->value(), pragmaValues.wal_autocheckpoint);
|
||||
db.setPragma("case_sensitive_like", ui->checkboxPragmaCaseSensitiveLike->isChecked(), pragmaValues.case_sensitive_like);
|
||||
|
||||
updatePragmaUi();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user