Skip to content

Commit 91964b7

Browse files
chirizxcerlend-aasland
authored andcommitted
[3.14] pythongh-138736: Fix sqlite3.Connection.blobopen 'row' parameter type and naming (python#138738)
The 'row' parameter represents a ROWID. Clarify this in docs and docstrings. (cherry picked from commit 8eb1062)
1 parent 9d0ca23 commit 91964b7

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

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

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

628-
:param str row:
629-
The name of the row where the blob is located.
628+
:param int rowid:
629+
The row id where the blob is located.
630630

631631
:param bool readonly:
632632
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
@@ -579,8 +579,8 @@ _sqlite3.Connection.blobopen as blobopen
579579
Table name.
580580
column as col: str
581581
Column name.
582-
row: sqlite3_int64
583-
Row index.
582+
rowid as row: sqlite3_int64
583+
Row id.
584584
/
585585
*
586586
readonly: bool = False
@@ -594,7 +594,7 @@ Open and return a BLOB object.
594594
static PyObject *
595595
blobopen_impl(pysqlite_Connection *self, const char *table, const char *col,
596596
sqlite3_int64 row, int readonly, const char *name)
597-
/*[clinic end generated code: output=6a02d43efb885d1c input=23576bd1108d8774]*/
597+
/*[clinic end generated code: output=6a02d43efb885d1c input=cc3d4b47dac08401]*/
598598
{
599599
if (!pysqlite_check_thread(self) || !pysqlite_check_connection(self)) {
600600
return NULL;

0 commit comments

Comments
 (0)