fix: treat sqlsrv as valid 'transactsql' type for sql-formatter #1633
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.
The Problem
When you use MSSQL your database driver key is
sqlsrv
. These keys sometimes line up with the name in sql-formatter that its using for dialect. Sometimes they do not. In the case of MSSQL users you'll get a crash viewing a query. This broke after the addition of proper dialect formatting in #1620The Solution
Much like
pgsql
is mapped to the sql-formatter specific naming ofpostgresql
, we do the same forsqlsrv
which is described by author as proper dialect (transactsql
) here.Auditing rest of supported Laravel DBs and we should be set now.
now fixed :)
Meta