Repository navigation
Conversation
The quoting pattern had `\|\(`, which matches the two characters `|(`,
not `(`. So build() did not put a value such as `a(b` in braces, unless
the value also had another special character, such as `)`.
Use the character list from the ODBC SQLDriverConnect documentation:
[]{}(),;?*=!@. Only values that contain `(` change, and the change only
adds braces. A bare `|` is not in that list, so it stays unquoted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README did not describe build(). Add a section with an example and the encoding rules: booleans, empty values, when a value goes in braces, how a `}` and a `=` in a key are escaped, and that the output is the ODBC format, not a SqlClient connection string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
build()now puts a value that contains(in braces. Before, the quoting pattern matched the two characters|(, not a bare(. So a value such asa(bstayed unquoted, unless it also had another special character. This PR also adds a README section onbuild().Changes
build()quotes a value that contains any of[]{}(),;?*=!@. This is the list from the ODBC SQLDriverConnect documentation. A bare|is not in the list, so it stays unquoted.build(): an example, the encoding rules, and that the output is the ODBC format, not a SqlClient connection string. It also describes the current behaviour for a value that is already in braces:build()writes it unchanged. Item 2 of Parser swallows the pair after an empty value; builder mis-quotes brace-wrapped values and a bare(#279 is about that behaviour, and this PR does not change it.Behaviour changes
Only values that contain
(change, and the change only adds braces. For example,build({ Pwd: 'a(b' })now givesPwd={a(b}, notPwd=a(b.parse()reads both forms asa(b.Testing
(fail on 1.1.3 and pass on this branch. The list test also fails if any one character is removed from the pattern.(.npm run lint,tsc --noEmit,npm run buildand commitlint pass on each commit. All 74 tests pass on Node 20, 22, 24 and 26.Part of #279.
🤖 Generated with Claude Code