-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
sqlite3 docs: explain SELECT-with-literals trick #96165
Comments
I think this would be useful. Personally I have a basic understanding of DBs and SQL, but there are always a number of things I have to google (especially while jumping from one SQL dialect to the other). In particular, I would find the following things useful:
The last two items could even be combined in a relatively compact table like:
This will allow the reader to learn how to do some common operations and at the same time figure out the syntax from the examples and recombine them to achieve what they need without having to leave the page. It doesn't need to have any explanation. It could also be considered as a cheat sheet (which I'm not sure where it fits in diataxis). |
Hit the wrong button, sorry |
I am, of course, a complete SQL n00b (much of what little I do know is just from reviewing your PRs on the subject), so take this for what it is, but I certainly did. In particular, what was most strange to me was that we were creating a database but then somehow using SELECT queries to just "magically" make up what we wanted anyway, instead of actually querying the database.
Personally, even though this would be helpful to me, I'm wary of duplicating already (presumably) good and well-developed SQL documentation elsewhere, though I would be a major fan of instead linking to them early and often whenever a new concept comes up...assuming such exists. In particular, I'm sure many good, relatively straightforward SQL/SQLite tutorials exist many other places, so it might seem a better idea to link to such, rather than reinventing the wheel, unless there is something Also, at least for the That being said, I like many of the specific concepts @ezio-melotti mentioned in the context of being how-tos or explanations, as they are useful, specific and intersect with I also like the table @ezio-melotti suggests, it covers the very basics and gets the user started quickly, but is also highly succient. It should also, preferably, link each item to (ideally) a SQLIte how-to, or other SQLite/etc. material explaining it in more detail, for those interested.
Hmm, well does it serve the user's work or study? Work, clearly, which narrows it down to Reference or How-to (which intuitively is what one would expect). But does it describe practical steps, or theoretical knowledge? I'd say practical steps, mostly, even though it is highly succient, rather than being a formal reference. Therefore, I'd say it would belong to a how-to section, personally. We could ask Daniele, though. |
I agree with CAM; a cheat-sheet is a |
I also agree there is no need for an SQL/SQLite tutorial here. We also don't want that maintenance burden. |
…ythonGH-106513) (cherry picked from commit fc7ff1a) Co-authored-by: Mariusz Felisiak <[email protected]>
…ythonGH-106513) (cherry picked from commit fc7ff1a) Co-authored-by: Mariusz Felisiak <[email protected]>
…onGH-106451) (cherry picked from commit f520804) Co-authored-by: Mariusz Felisiak <[email protected]>
…onGH-106451) (cherry picked from commit f520804) Co-authored-by: Mariusz Felisiak <[email protected]>
…H-106513) (#106646) (cherry picked from commit fc7ff1a) Co-authored-by: Mariusz Felisiak <[email protected]>
…H-106513) (#106645) (cherry picked from commit fc7ff1a) Co-authored-by: Mariusz Felisiak <[email protected]>
…106451) (#106647) (cherry picked from commit f520804) Co-authored-by: Mariusz Felisiak <[email protected]>
…106451) (#106648) cherry picked from commit f520804) Co-authored-by: Mariusz Felisiak <[email protected]>
Big thanks to @felixxm for the docs updates! |
Some examples use the following SQL trick:
Some people may find such examples strange, because:
We may consider one or more of the following:
Originally posted by @erlend-aasland in #96122 (comment)
Linked PRs
The text was updated successfully, but these errors were encountered: