@@ -594,7 +594,7 @@ bool DBBrowserDB::dump(const QString& filename,
594594 for (auto it=objMap.constBegin ();it!=objMap.constEnd ();++it)
595595 {
596596 // Make sure it's not a table again
597- if (it.value ().gettype () == sqlb::Object::ObjectTypes ::Table)
597+ if (it.value ().gettype () == sqlb::Object::Types ::Table)
598598 continue ;
599599
600600 // Write the SQL string used to create this object to the output file
@@ -1076,11 +1076,11 @@ bool DBBrowserDB::renameColumn(const QString& tablename, const sqlb::Table& tabl
10761076 for (auto it=objMap.constBegin ();it!=objMap.constEnd ();++it)
10771077 {
10781078 // If this object references the table and it's not the table itself save it's SQL string
1079- if ((*it).getTableName () == tablename && (*it).gettype () != sqlb::Object::ObjectTypes ::Table)
1079+ if ((*it).getTableName () == tablename && (*it).gettype () != sqlb::Object::Types ::Table)
10801080 {
10811081 // If this is an index, update the fields first. This highly increases the chance that the SQL statement won't throw an
10821082 // error later on when we try to recreate it.
1083- if ((*it).gettype () == sqlb::Object::ObjectTypes ::Index)
1083+ if ((*it).gettype () == sqlb::Object::Types ::Index)
10841084 {
10851085 sqlb::IndexPtr idx = (*it).object .dynamicCast <sqlb::Index>();
10861086 for (int i=0 ;i<idx->columns ().size ();i++)
@@ -1240,34 +1240,34 @@ void DBBrowserDB::updateSchema( )
12401240 QString val_temp = QString::fromUtf8 ((const char *)sqlite3_column_text (vm, 4 ));
12411241 val_sql.replace (" \r " , " " );
12421242
1243- sqlb::Object::ObjectTypes type;
1243+ sqlb::Object::Types type;
12441244 if (val_type == " table" )
1245- type = sqlb::Object::ObjectTypes ::Table;
1245+ type = sqlb::Object::Types ::Table;
12461246 else if (val_type == " index" )
1247- type = sqlb::Object::ObjectTypes ::Index;
1247+ type = sqlb::Object::Types ::Index;
12481248 else if (val_type == " trigger" )
1249- type = sqlb::Object::ObjectTypes ::Trigger;
1249+ type = sqlb::Object::Types ::Trigger;
12501250 else if (val_type == " view" )
1251- type = sqlb::Object::ObjectTypes ::View;
1251+ type = sqlb::Object::Types ::View;
12521252 else
12531253 continue ;
12541254
12551255 DBBrowserObject obj (val_name, val_sql, type, val_tblname);
1256- if ((type == sqlb::Object::ObjectTypes ::Table || type == sqlb::Object::ObjectTypes ::Index) && !val_sql.isEmpty ())
1256+ if ((type == sqlb::Object::Types ::Table || type == sqlb::Object::Types ::Index) && !val_sql.isEmpty ())
12571257 {
12581258 obj.object = sqlb::Object::parseSQL (type, val_sql);
12591259 if (val_temp == " 1" )
12601260 obj.object ->setTemporary (true );
12611261
12621262 // For virtual tables query the column list using the SQLite pragma
1263- if (type == sqlb::Object::ObjectTypes ::Table && obj.object .dynamicCast <sqlb::Table>()->isVirtual ())
1263+ if (type == sqlb::Object::Types ::Table && obj.object .dynamicCast <sqlb::Table>()->isVirtual ())
12641264 {
12651265 sqlb::TablePtr tab = obj.object .dynamicCast <sqlb::Table>();
12661266 auto columns = queryColumnInformation (val_name);
12671267 foreach (const auto & column, columns)
12681268 tab->addField (sqlb::FieldPtr (new sqlb::Field (column.first , column.second )));
12691269 }
1270- } else if (type == sqlb::Object::ObjectTypes ::View) {
1270+ } else if (type == sqlb::Object::Types ::View) {
12711271 // For views we currently can't rely on our grammar parser to get the column list. Use the pragma offered by SQLite instead
12721272 auto columns = queryColumnInformation (val_name);
12731273 sqlb::Table* view_dummy = new sqlb::Table (" " );
0 commit comments