Uh oh!
There was an error while loading. Please reload this page.
gh-96168: Add sqlite3 row factory how-to - #99507
Conversation
7f95848 to
dc774c6Comparedc774c6 to
e985babCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Thanks @erlend-aasland .
Overall, I found the examples helpful, and a good balance between concise and detailed. However, maybe this is just me, but to me the section did appear pretty heavy on examples, but without as much explicit focus on solving specific user problems, as would be appropriate for a how-to. In that sense, it almost feels more like a tutorial, having readers learn using row factories by example, as opposed to telling them how to solve specific problems using row factories.
@ezio-melotti , what do you think?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland
commented
Nov 16, 2022
Yeah, maybe... but How To's are recipes. How can I create a foo row factory? How do I use a bar row factory? How do I use the sqlite3.Row row factory? I don't think it matters much that it is example heavy. IMO it is too thin for a tutorial, and definitely too thin for an explanation. |
Ouch, it just occurred to me that the Cursor also has a
So, more prose coming up. >>>importsqlite3>>>cx=sqlite3.connect(":memory:")
>>>cx.row_factory=sqlite3.Row>>>cu=cx.cursor()
>>>cx.row_factory=None>>>cu.row_factory==cx.row_factoryFalse>>>cu.connection.row_factory==cx.row_factoryTrue |
erlend-aasland
commented
Nov 22, 2022
@CAM-Gerlach: I've reworded the reference, hopefully to the better; IMO the current version reflects the difference between the two row factory attributes more clearly. I also removed the example from ab98877; IMO it is superfluous with the now (hopefully) improved reference. Looking forward to your comments. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Looks pretty good to me now, personally, Just a couple minor suggestions and followups to others' comments.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Just one comment cleaning up my own mess, otherwise LGTM from my side, thanks.
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland
commented
Nov 25, 2022
Thanks again y'all for improving this part of the docs. I'm going to land this later today. A lot of back and forth, but IMO totally worth it. |
miss-islington
commented
Nov 25, 2022
Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
(cherry picked from commit 8749121) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
bedevere-bot
commented
Nov 25, 2022
GH-99778 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 8749121) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
bedevere-bot
commented
Nov 25, 2022
GH-99779 is a backport of this pull request to the 3.10 branch. |
Uh oh!
There was an error while loading. Please reload this page.