feat: migrate version queries to typescript #16153
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Description Of Change
This PR migrates queries related to getting the database version to TypeScript, as well as a few simple ones that only required moving to the code to the typescript file.
The real goal of the file is to implement a way to have internal code in query interface that cannot be accessed from the public API, but can still be modified by dialects.
This was done using
AbstractQueryInterfaceInternal
, see its uses inAbstractQueryInterfaceTypeScript
andPostgresQueryInterfaceTypeScript
. In the current implementation, Postgres does not replace the class with its own implementation, but it can when it starts needing to do that.I also moved the logic for processing version queries out of
query.js
and into the query interface, with the long term goal of removing the query types used to format what are simple selects (VERSION, SHOWCONSTRAINTS, FOREIGNKEYS, DESCRIBE, SHOWINDEXES, SHOWTABLES)Breaking Changes
QueryTypes.VERSION
has been removedAbstractQueryInterface#databaseVersion
has been renamed toAbstractQueryInterface#fetchDatabaseVersion