Skip to content

Commit 8eb1062

Browse files
authored
gh-138736: Fix sqlite3.Connection.blobopen 'row' parameter type and naming (#138738)
The 'row' parameter represents a ROWID. Clarify this in docs and docstrings.
1 parent 77a22ef commit 8eb1062

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Doc/library/sqlite3.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ Connection objects
620620
supplied, this must be a :term:`callable` returning
621621
an instance of :class:`Cursor` or its subclasses.
622622

623-
.. method:: blobopen(table, column, row, /, *, readonly=False, name="main")
623+
.. method:: blobopen(table, column, rowid, /, *, readonly=False, name="main")
624624

625625
Open a :class:`Blob` handle to an existing
626626
:abbr:`BLOB (Binary Large OBject)`.
@@ -631,8 +631,8 @@ Connection objects
631631
:param str column:
632632
The name of the column where the blob is located.
633633

634-
:param str row:
635-
The name of the row where the blob is located.
634+
:param int rowid:
635+
The row id where the blob is located.
636636

637637
:param bool readonly:
638638
Set to ``True`` if the blob should be opened without write

Modules/_sqlite/clinic/connection.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/_sqlite/connection.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ _sqlite3.Connection.blobopen as blobopen
578578
Table name.
579579
column as col: str
580580
Column name.
581-
row: sqlite3_int64
582-
Row index.
581+
rowid as row: sqlite3_int64
582+
Row id.
583583
/
584584
*
585585
readonly: bool = False
@@ -593,7 +593,7 @@ Open and return a BLOB object.
593593
static PyObject *
594594
blobopen_impl(pysqlite_Connection *self, const char *table, const char *col,
595595
sqlite3_int64 row, int readonly, const char *name)
596-
/*[clinic end generated code: output=6a02d43efb885d1c input=23576bd1108d8774]*/
596+
/*[clinic end generated code: output=6a02d43efb885d1c input=cc3d4b47dac08401]*/
597597
{
598598
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
599599
return NULL;

0 commit comments

Comments
 (0)