Skip to content
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

database/sql: (improve idea) Auto-detect inconsistency between args and placeholdes #2873

Open
sintanial opened this issue Feb 23, 2017 · 0 comments

Comments

@sintanial
Copy link

sintanial commented Feb 23, 2017

Hello, i have idea to improve plugin.
When i writing code with golang sql driver, i often don't see bug with inconsistency between args and placeholders.
Here is example:

    db.Query(`SELECT * FROM orders WHERE id = ? AND customer_id = ?`, orderId)

In this case, i missed argument for custom_id = ?, and this errors occurs only in runtime :(.

So, plugin can check and highlight this bug, like in fmt.Sprintf when plugin highlight inconsistency.

P.s. Sorry for my English.

@sintanial sintanial changed the title database/sql: Auto-detect consistency between args and placeholdes database/sql: Auto-detect inconsistency between args and placeholdes Feb 23, 2017
@sintanial sintanial changed the title database/sql: Auto-detect inconsistency between args and placeholdes database/sql: (improve idea) Auto-detect inconsistency between args and placeholdes Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant