@@ -187,7 +187,7 @@ Module functions and constants
187
187
Registers a callable to convert the custom Python type *type * into one of
188
188
SQLite's supported types. The callable *callable * accepts as single parameter
189
189
the Python value, and must return a value of the following types: int,
190
- float, str, bytes (UTF-8 encoded) or buffer .
190
+ float, str or bytes .
191
191
192
192
193
193
.. function :: complete_statement(sql)
@@ -282,7 +282,7 @@ Connection Objects
282
282
as the SQL function.
283
283
284
284
The function can return any of the types supported by SQLite: bytes, str, int,
285
- float, buffer and None.
285
+ float and None.
286
286
287
287
Example:
288
288
@@ -298,7 +298,7 @@ Connection Objects
298
298
final result of the aggregate.
299
299
300
300
The ``finalize `` method can return any of the types supported by SQLite:
301
- bytes, str, int, float, buffer and None.
301
+ bytes, str, int, float and None.
302
302
303
303
Example:
304
304
@@ -633,11 +633,9 @@ The following Python types can thus be sent to SQLite without any problem:
633
633
+-------------------------------+-------------+
634
634
| :class: `float ` | ``REAL `` |
635
635
+-------------------------------+-------------+
636
- | :class: `bytes ` (UTF8-encoded) | ``TEXT `` |
637
- +-------------------------------+-------------+
638
636
| :class: `str ` | ``TEXT `` |
639
637
+-------------------------------+-------------+
640
- | :class: `buffer ` | ``BLOB `` |
638
+ | :class: `bytes ` | ``BLOB `` |
641
639
+-------------------------------+-------------+
642
640
643
641
@@ -654,7 +652,7 @@ This is how SQLite types are converted to Python types by default:
654
652
+-------------+---------------------------------------------+
655
653
| ``TEXT `` | depends on text_factory, str by default |
656
654
+-------------+---------------------------------------------+
657
- | ``BLOB `` | buffer |
655
+ | ``BLOB `` | :class: ` bytes ` |
658
656
+-------------+---------------------------------------------+
659
657
660
658
The type system of the :mod: `sqlite3 ` module is extensible in two ways: you can
@@ -669,7 +667,7 @@ Using adapters to store additional Python types in SQLite databases
669
667
As described before, SQLite supports only a limited set of types natively. To
670
668
use other Python types with SQLite, you must **adapt ** them to one of the
671
669
sqlite3 module's supported types for SQLite: one of NoneType, int, float,
672
- str, bytes, buffer .
670
+ str, bytes.
673
671
674
672
The :mod: `sqlite3 ` module uses Python object adaptation, as described in
675
673
:pep: `246 ` for this. The protocol to use is :class: `PrepareProtocol `.
0 commit comments