Skip to content

Commit 1c47d45

Browse files
chirizxcerlend-aasland
authored andcommitted
[3.13] gh-138736: Fix sqlite3.Connection.blobopen 'row' parameter type and naming (#138738)
The 'row' parameter represents a ROWID. Clarify this in docs and docstrings. (cherry picked from commit 8eb1062)
1 parent 2806469 commit 1c47d45

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
@@ -632,7 +632,7 @@ Connection objects
632632
supplied, this must be a :term:`callable` returning
633633
an instance of :class:`Cursor` or its subclasses.
634634

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

637637
Open a :class:`Blob` handle to an existing
638638
:abbr:`BLOB (Binary Large OBject)`.
@@ -643,8 +643,8 @@ Connection objects
643643
:param str column:
644644
The name of the column where the blob is located.
645645

646-
:param str row:
647-
The name of the row where the blob is located.
646+
:param int rowid:
647+
The row id where the blob is located.
648648

649649
:param bool readonly:
650650
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
@@ -573,8 +573,8 @@ _sqlite3.Connection.blobopen as blobopen
573573
Table name.
574574
column as col: str
575575
Column name.
576-
row: sqlite3_int64
577-
Row index.
576+
rowid as row: sqlite3_int64
577+
Row id.
578578
/
579579
*
580580
readonly: bool = False
@@ -588,7 +588,7 @@ Open and return a BLOB object.
588588
static PyObject *
589589
blobopen_impl(pysqlite_Connection *self, const char *table, const char *col,
590590
sqlite3_int64 row, int readonly, const char *name)
591-
/*[clinic end generated code: output=6a02d43efb885d1c input=23576bd1108d8774]*/
591+
/*[clinic end generated code: output=6a02d43efb885d1c input=cc3d4b47dac08401]*/
592592
{
593593
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
594594
return NULL;

0 commit comments

Comments
 (0)