SQLCheck
Dev tools
sql linter
SHOW HN2017
How HN took it
0 positive, 6 neutral or asking, 1 mixed, 7 critical, out of 14 comments about the project. Thread score -0.44.
Idea: 0 for, 4 againstDocs: 0 for, 3 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Interesting idea and useful as a hint tool.
From 2 comments
The join one is particularly bad as it can make your query run much slower as running multiple queries is almost never a win. A check for the opposite (multiple queries when one…
extrapickles on HNThanks for sharing these interesting anecdotes.
jarulraj on HN
Objections
Some checks, like splitting queries and avoiding JOINs, may give bad advice.
From 3 comments
The tests in this read like someone who has only used one SQL dialect, and wanted another project to show off C++ abilities. Its full of bad advice that does little to help…
bsg75 on HNThe join one is particularly bad as it can make your query run much slower as running multiple queries is almost never a win. A check for the opposite (multiple queries when one…
extrapickles on HNYup, the "CheckSpaghettiQuery" is a recipe for disaster. I have a query here that runs on a raspberry pi running postgresql with 7 GB of data (chat logs in a postgres table, with…
kuschku on HN
Column prefixing and generic id naming are disputed.
From 2 comments
https://github.com/jarulraj/sqlcheck/blob/master/docs/logical/1004.md Strongly disagree. Table columns should always be prefixed with table name. So users.user_id is one of the…
Achshar on HNThis doesn't allow for finer semantics. Just "u.id" tells us what the thing is, but not its role in the schema. I don't think it's very unusual to do this. The most obvious…
CWuestefeld on HN
Offset pagination check dismisses a real use case.
From 2 comments
I feel like the author unjustly brushes aside the main benefit of using offsets for pagination (that is: the ability to query a specific page of results). Yeah, most page-based…
yellowapple on HNA complicated solution to something that is not a problem, at least for my lowly business CRUD apps.
combatentropy on HN
Requests
Provide evidence that each flagged pattern is actually bad.
From 1 comment
The join one is particularly bad as it can make your query run much slower as running multiple queries is almost never a win. A check for the opposite (multiple queries when one…
extrapickles on HN
Add a check requiring column names to be table-prefixed.
From 1 comment
Thanks for sharing your perspective. I will add a new check to ensure that table columns are always be prefixed with table name. However, I still think that it is worthwhile to…
jarulraj on HN
Improve documentation for the join check.
From 2 comments
Interesting. Some bones to pick: https://github.com/jarulraj/sqlcheck/blob/master/docs/query/3013.md First, dat implicit, inner join. Second, it could be written more clearly…
snake_plissken on HNCan you please open an issue or send a PR to update the documentation? Thanks!
jarulraj on HN
Questions
Does it work with SQL dialects like T-SQL?
From 1 comment
Sounds good in theory. but I wonder how well it works for any SQL dialects. I write SQL in a dialect like T-SQL usually. The tool would probably not recognize the brackets or…
sebazzz on HN