-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
gh-138736: fix sqlite3.Connection.blobopen
row
type
#138738
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
base: main
Are you sure you want to change the base?
Conversation
Doc/library/sqlite3.rst
Outdated
|
||
:param str row: | ||
:param int row: | ||
The name of the row where the blob is located. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really a name if it is an int?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Row id of the row that contains the blob." how about this wording?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source code of the sqlite3 module says it is "Row index."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably go with "The index of the row where the blob is located." as the minimal semantically correct change.
But i am not a core dev. So my ideas are just suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer "The index of [...]".
Err.... Actually... I'm very sorry but I think we should use the term "id". Here what I mean. The sqlite docs (https://sqlite.org/c3ref/blob_open.html) say ROWID (https://sqlite.org/lang_createtable.html#rowid). I think it's more precise than index because nothing guarantees that the first row has index 1 and there are tables without indices. For instance in https://sqlite.org/queryplanner.html#_lookup_by_rowid, the rowId does not match the "index" if we were to consider the table as an array. So maybe ID is better (and the C code could be improved instead). |
row
insqlite3.Connection.blobopen
#138736📚 Documentation preview 📚: https://cpython-previews--138738.org.readthedocs.build/