Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-96165: Clarify omitting the FROM clause in SQLite queries.#106513
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
felixxm commented Jul 7, 2023 • edited by github-actions bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by github-actions bot
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland commented Jul 7, 2023
Thanks, Mariusz! I wonder if we should put these hints in their own how-to. @CAM-Gerlach and @ezio-melotti, what do you think? |
Uh oh!
There was an error while loading. Please reload this page.
ezio-melotti commented Jul 7, 2023
I remember noticing the "unusual" query with no Regarding the note itself, I wonder if the wording could be simplified a bit, since in just two sentences it talks about clauses, statements, row, columns, expressions, literals, and aliases. Even though it's correct and understandable, if the reader is not familiar with all the terms, it might take a couple of re-reads to understand it. |
felixxm commented Jul 7, 2023
I'm not sure if it's worth. For example, in Django we try to avoid duplicating of 3rd-party documentation. |
felixxm commented Jul 7, 2023
We could use diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index f6a8714519..6d9b1c22ce 100644 --- a/Doc/library/sqlite3.rst+++ b/Doc/library/sqlite3.rst@@ -2523,7 +2523,7 @@ Queries now return :class:`!Row` objects: The ``FROM`` clause can be omitted in the ``SELECT`` statement, as in the above example. In such cases, SQLite returns a single row with columns - defined by expressions, e.g. literals, with the given aliases+ defined by expressions, e.g. constant values, with the given names ``expr AS alias``. You can create a custom :attr:`~Cursor.row_factory`On the other hand, the term |
erlend-aasland commented Jul 11, 2023
I think 'literal' is fine in programming language docs ;) |
miss-islington commented Jul 11, 2023
Thanks @felixxm for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
miss-islington commented Jul 11, 2023
Thanks @felixxm for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…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]>
bedevere-bot commented Jul 11, 2023
GH-106645 is a backport of this pull request to the 3.12 branch. |
bedevere-bot commented Jul 11, 2023
GH-106646 is a backport of this pull request to the 3.11 branch. |
felixxm commented Jul 11, 2023
@erlend-aasland Thanks 👍 |
…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]>
📚 Documentation preview 📚: https://cpython-previews--106513.org.readthedocs.build/