In November 2019, all CodeQL tools started using the term "CodeQL database" to describe the directory containing queryable data, extracted from the code, and a source reference, for displaying query results directly in the code. Previously this was known as a "snapshot".
A CodeQL database for a project represents the source code at a particular point in time. GitHub products create a database for a specific coding language that is used in the project, and extract the source files written in that language. In particular, a database contains information about a single coding language used in the project. If a project uses multiple languages, then you can create a database for each language.
For detailed information about CodeQL analysis and database creation, see CodeQL analysis in the CodeQL help.
CodeQL databases are saved as zip archives. You import them directly into CodeQL for Eclipse without unzipping them. (They typically include very long paths so unzipping them can cause problems on Windows machines). To find out how to obtain a CodeQL database, see Obtaining a CodeQL database.
Exploring files with the Project Explorer
- CodeQL default library—contains the standard CodeQL
libraries and queries for the currently selected coding language (here
For Go, the default CodeQL library is in a separate project. See Analyzing Go projects for more information.
- codeql-database.yml file—contains information about the location of the project's source code. It is automatically created by some CodeQL tools and you shouldn't need to change it manually. CodeQL for Eclipse uses the location in this file to display relative paths in the Results view.
- Archive of the source code—used by Eclipse to create the virtual source code folder .
Depending on how you've configured the Project Explorer, you may also see three system files:
.qlpath. These store information about the CodeQL database. For more information, see qlpath file.