forked from qt-creator/qt-creator
Clang: Add file informations table
We could add this properties to the sources table but then we have to handle null values which makes the SQL statements much more complicated and most probably slower too. Change-Id: Ie2a1e4862b0517825292213567725d6c18abfb30 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -48,6 +48,7 @@ public:
|
||||
createProjectPartsTable();
|
||||
createProjectPartsSourcesTable();
|
||||
createUsedMacrosTable();
|
||||
createFileInformationsTable();
|
||||
|
||||
transaction.commit();
|
||||
}
|
||||
@@ -146,6 +147,18 @@ public:
|
||||
table.initialize(database);
|
||||
}
|
||||
|
||||
void createFileInformationsTable()
|
||||
{
|
||||
Sqlite::Table table;
|
||||
table.setUseIfNotExists(true);
|
||||
table.setName("fileInformations");
|
||||
table.addColumn("sourceId", Sqlite::ColumnType::Integer, Sqlite::Contraint::PrimaryKey);
|
||||
table.addColumn("size", Sqlite::ColumnType::Integer);
|
||||
table.addColumn("lastModified", Sqlite::ColumnType::Integer);
|
||||
|
||||
table.initialize(database);
|
||||
}
|
||||
|
||||
public:
|
||||
DatabaseType &database;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user