Problems with WITHOUT ROWID tables

Quoted values in DELETE FROM and UPDATE SET take into account that value
could have a single quote and they are now doubled.

Detect tables without rowid in order to make invisible the "Show rowid
column"

See issue #1332
This commit is contained in:
mgrojo
2018-02-28 23:18:49 +01:00
parent b1ba58fcc0
commit 3277174cb1
2 changed files with 5 additions and 4 deletions

View File

@@ -595,8 +595,9 @@ void MainWindow::populateTable()
if(db.getObjectByName(currentlyBrowsedTableName())->type() == sqlb::Object::Table)
{
// Table
sqlb::TablePtr table = db.getObjectByName(currentlyBrowsedTableName()).dynamicCast<sqlb::Table>();
ui->actionUnlockViewEditing->setVisible(false);
ui->actionShowRowidColumn->setVisible(true);
ui->actionShowRowidColumn->setVisible(!table->isWithoutRowidTable());
} else {
// View
ui->actionUnlockViewEditing->setVisible(true);