mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
Support tables with empty table names
Apparently SQLite supports empty table names for whatever reason. This commit patches SQLiteBrowser to support databases with a table with an empty name. I haven't removed the check for an empty table name in the Create/Edit table dialog though because you probably really shouldn't create such a table. See issue #194.
This commit is contained in:
@@ -39,7 +39,7 @@ void SqliteTableModel::setTable(const QString& table)
|
||||
if(m_db->getObjectByName(table).gettype() == "table")
|
||||
{
|
||||
sqlb::Table t = sqlb::Table::parseSQL(m_db->getObjectByName(table).getsql()).first;
|
||||
if(t.name() != "") // parsing was OK
|
||||
if(t.fields().size()) // parsing was OK
|
||||
{
|
||||
m_headers.push_back(t.rowidColumn());
|
||||
m_headers.append(m_db->getObjectByName(table).table.fieldNames());
|
||||
|
||||
Reference in New Issue
Block a user