Clang: Locator filter for the symbol database

There are no symbol queries for the locator filters. The signature
generation is still not implemented but for simple cases it should work.

Change-Id: Ic6b04fbe1e7e057892f194ac139615c47d6ec33f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-04-09 13:30:30 +02:00
parent 18de1e3fcf
commit 4b0bcbdcb6
57 changed files with 649 additions and 1118 deletions

View File

@@ -62,10 +62,11 @@ public:
table.setName("symbols");
table.addColumn("symbolId", Sqlite::ColumnType::Integer, Sqlite::Contraint::PrimaryKey);
const Sqlite::Column &usrColumn = table.addColumn("usr", Sqlite::ColumnType::Text);
table.addColumn("symbolName", Sqlite::ColumnType::Text);
const Sqlite::Column &symbolNameColumn = table.addColumn("symbolName", Sqlite::ColumnType::Text);
const Sqlite::Column &symbolKindColumn = table.addColumn("symbolKind", Sqlite::ColumnType::Integer);
table.addColumn("signature", Sqlite::ColumnType::Text);
table.addIndex({usrColumn});
table.addIndex({symbolKindColumn});
table.addIndex({symbolKindColumn, symbolNameColumn});
table.initialize(database);
}
@@ -79,7 +80,9 @@ public:
const Sqlite::Column &lineColumn = table.addColumn("line", Sqlite::ColumnType::Integer);
const Sqlite::Column &columnColumn = table.addColumn("column", Sqlite::ColumnType::Integer);
const Sqlite::Column &sourceIdColumn = table.addColumn("sourceId", Sqlite::ColumnType::Integer);
const Sqlite::Column &locationKindColumn = table.addColumn("locationKind", Sqlite::ColumnType::Integer);
table.addUniqueIndex({sourceIdColumn, lineColumn, columnColumn});
table.addIndex({sourceIdColumn, locationKindColumn});
table.initialize(database);
}