@@ -1468,13 +1468,32 @@ Cursor objects
1468
1468
1469
1469
Required by the DB-API. Does nothing in :mod: `!sqlite3 `.
1470
1470
1471
- .. attribute :: rowcount
1471
+ .. attribute :: arraysize
1472
1472
1473
- Read-only attribute that provides the number of modified rows for
1474
- ``INSERT ``, ``UPDATE ``, ``DELETE ``, and ``REPLACE `` statements;
1475
- is ``-1 `` for other statements,
1476
- including :abbr: `CTE ( Common Table Expression ) ` queries.
1477
- It is only updated by the :meth: `execute ` and :meth: `executemany ` methods.
1473
+ Read/write attribute that controls the number of rows returned by :meth: `fetchmany `.
1474
+ The default value is 1 which means a single row would be fetched per call.
1475
+
1476
+ .. attribute :: connection
1477
+
1478
+ Read-only attribute that provides the SQLite database :class: `Connection `
1479
+ belonging to the cursor. A :class: `Cursor ` object created by
1480
+ calling :meth: `con.cursor() <Connection.cursor> ` will have a
1481
+ :attr: `connection ` attribute that refers to *con *:
1482
+
1483
+ .. doctest ::
1484
+
1485
+ >>> con = sqlite3.connect(" :memory:" )
1486
+ >>> cur = con.cursor()
1487
+ >>> cur.connection == con
1488
+ True
1489
+
1490
+ .. attribute :: description
1491
+
1492
+ Read-only attribute that provides the column names of the last query. To
1493
+ remain compatible with the Python DB API, it returns a 7-tuple for each
1494
+ column where the last six items of each tuple are ``None ``.
1495
+
1496
+ It is set for ``SELECT `` statements without any matching rows as well.
1478
1497
1479
1498
.. attribute :: lastrowid
1480
1499
@@ -1491,32 +1510,14 @@ Cursor objects
1491
1510
.. versionchanged :: 3.6
1492
1511
Added support for the ``REPLACE `` statement.
1493
1512
1494
- .. attribute :: arraysize
1495
-
1496
- Read/write attribute that controls the number of rows returned by :meth: `fetchmany `.
1497
- The default value is 1 which means a single row would be fetched per call.
1498
-
1499
- .. attribute :: description
1500
-
1501
- Read-only attribute that provides the column names of the last query. To
1502
- remain compatible with the Python DB API, it returns a 7-tuple for each
1503
- column where the last six items of each tuple are ``None ``.
1504
-
1505
- It is set for ``SELECT `` statements without any matching rows as well.
1506
-
1507
- .. attribute :: connection
1508
-
1509
- Read-only attribute that provides the SQLite database :class: `Connection `
1510
- belonging to the cursor. A :class: `Cursor ` object created by
1511
- calling :meth: `con.cursor() <Connection.cursor> ` will have a
1512
- :attr: `connection ` attribute that refers to *con *:
1513
+ .. attribute :: rowcount
1513
1514
1514
- .. doctest ::
1515
+ Read-only attribute that provides the number of modified rows for
1516
+ ``INSERT ``, ``UPDATE ``, ``DELETE ``, and ``REPLACE `` statements;
1517
+ is ``-1 `` for other statements,
1518
+ including :abbr: `CTE ( Common Table Expression ) ` queries.
1519
+ It is only updated by the :meth: `execute ` and :meth: `executemany ` methods.
1515
1520
1516
- >>> con = sqlite3.connect(" :memory:" )
1517
- >>> cur = con.cursor()
1518
- >>> cur.connection == con
1519
- True
1520
1521
1521
1522
.. The sqlite3.Row example used to be a how-to. It has now been incorporated
1522
1523
into the Row reference. We keep the anchor here in order not to break
0 commit comments