Show Resolved DBs (debug)
Prints which database(s) drag-lint would actually use for a given project, file, or platform, without running a real query.
Read this when a query seems to answer from the wrong index: it prints which database(s) drag-lint would use for a project, a file or a platform, without running a real query.
How to run it
Full flag list: resolve-dbs in the CLI reference.
Flags
| Flag | Argument | Meaning | Default |
|---|---|---|---|
--platform | |||
--config | <path> | ||
--repo | <file> | ||
--json |
Where to click
- RAD Studio main menu: drag-lint > Index & Maintenance > Show Resolved DBs (debug)...
- Choose drag-lint > Index & Maintenance > Show Resolved DBs (debug)...
- Read the list of databases it would use; no query is run
- From a shell:
drag-lint resolve-dbs [--platform win32|win64] [--config <path>] [--json]
Pitfalls
- never guess a DB path. Also --project
<P.dproj>and --platform<win32|win64>. Read-only: a DB that is not built yet stays on stdout as a bare path, with a stderr NOTE that marks it (missing) and prints the exact index command. - The IDE plugin can add one per-user reference index (since 1.54): %APPDATA%\drag-lint\drag-lint-plugin.ini, section [Databases], keys ReferenceDb (the file) and ReferenceDbFor (a part of the path of the project index it applies to). Missing file, key or database = off; the CLI does not read it.
Details
Prints which database(s) drag-lint would actually use for a given project, file, or platform, without running a real query. Reach for it when a query seems to be answering from the wrong index.
Running it from the CLI
drag-lint resolve-dbs [--platform win32|win64] [--config <path>] [--json]
drag-lint resolve-dbs --project <file.dproj> [--config <path>] [--json]
drag-lint resolve-dbs --in <file.pas> [--project <file.dproj>] [--config <path>] [--json]
The first form prints the consumer DB list query/lsp/serve would use.
--project prints the one DB that owns that project -- the write target;
it exits 2 and names the sections if none or several claim it, rather than
guessing. --in <file.pas> prints the read list the IDE would open for that
file (the active project's DB first, then the folder-matched DB); omit
--project to model "no project active".
resolve-dbs is read-only and never builds an index. A path that is not built yet stays bare on stdout, so scripts that capture it keep working; stderr carries one line per missing path: NOTE: <path> (missing) -- not built yet; build it with: <exact command> (since 1.44). The exit code does not change.
A reference index for a ported project (IDE plugin)
When a project is being ported from an older code base, the plugin can offer that code base's index as
one more read database, so hover and Find Usages answer names that live only there (since 1.54). It is
read from a per-user file, %APPDATA%\drag-lint\drag-lint-plugin.ini; no such database is built in:
[Databases]
ReferenceDb=D:\Old\_D-RAG\OldApp.sqlite
ReferenceDbFor=NewApp
ReferenceDb is the index file. ReferenceDbFor is a part of the path of the active project's own index
(case ignored); the reference index is added only when it matches. With the file, either key or the
database absent, nothing is added and nothing is reported. It is never written to.
This plugin list is not what the CLI's resolve-dbs prints.
What it needs
No index required -- this command has no --db flag; it only resolves and
prints which database(s) drag-lint would use, from config and the manifest,
without querying index content.
Example
Illustrative only:
drag-lint resolve-dbs --project C:\Projects\MyApp\MyApp.dproj --json
This would print, as JSON, the one database that owns MyApp.dproj.