Skip to content

Clarify support for passing a string to the second argument of format #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lgarczyn opened this issue Jun 22, 2020 · 2 comments
Closed
Labels

Comments

@lgarczyn
Copy link

Currently the calls format('?', 'test') and format('?', ['test']) appear to give the exact same result, however neither @types/sqlstring nor @types/mysql mention this feature.

Is it deprecated, unintended or simply undocumented?

@dougwilson
Copy link
Member

Hi @lgarczyn , it is a deprecated way to pass just a single value, yes. It used to be in the docs, but I believe it was removed in order to discourage it's usage, as it was confusing on how it worked, especially when that single ? was itself an array.

@lgarczyn
Copy link
Author

Thanks, that makes a whole lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants