[Python-checkins] r77923 - python/branches/py3k/Doc/library/sqlite3.rst

antoine.pitrou python-checkins at python.org
Wed Feb 3 00:00:29 CET 2010


Author: antoine.pitrou
Date: Wed Feb  3 00:00:29 2010
New Revision: 77923

Log:
Fix sqlite3 docs.  `buffer` is gone, `bytes` objects are returned for BLOBs instead.
Patch by Pablo Mouzo.



Modified:
   python/branches/py3k/Doc/library/sqlite3.rst

Modified: python/branches/py3k/Doc/library/sqlite3.rst
==============================================================================
--- python/branches/py3k/Doc/library/sqlite3.rst	(original)
+++ python/branches/py3k/Doc/library/sqlite3.rst	Wed Feb  3 00:00:29 2010
@@ -187,7 +187,7 @@
    Registers a callable to convert the custom Python type *type* into one of
    SQLite's supported types. The callable *callable* accepts as single parameter
    the Python value, and must return a value of the following types: int,
-   float, str, bytes (UTF-8 encoded) or buffer.
+   float, str or bytes.
 
 
 .. function:: complete_statement(sql)
@@ -282,7 +282,7 @@
    as the SQL function.
 
    The function can return any of the types supported by SQLite: bytes, str, int,
-   float, buffer and None.
+   float and None.
 
    Example:
 
@@ -298,7 +298,7 @@
    final result of the aggregate.
 
    The ``finalize`` method can return any of the types supported by SQLite:
-   bytes, str, int, float, buffer and None.
+   bytes, str, int, float and None.
 
    Example:
 
@@ -633,11 +633,9 @@
 +-------------------------------+-------------+
 | :class:`float`                | ``REAL``    |
 +-------------------------------+-------------+
-| :class:`bytes` (UTF8-encoded) | ``TEXT``    |
-+-------------------------------+-------------+
 | :class:`str`                  | ``TEXT``    |
 +-------------------------------+-------------+
-| :class:`buffer`               | ``BLOB``    |
+| :class:`bytes`                | ``BLOB``    |
 +-------------------------------+-------------+
 
 
@@ -654,7 +652,7 @@
 +-------------+---------------------------------------------+
 | ``TEXT``    | depends on text_factory, str by default     |
 +-------------+---------------------------------------------+
-| ``BLOB``    | buffer                                      |
+| ``BLOB``    | :class:`bytes`                              |
 +-------------+---------------------------------------------+
 
 The type system of the :mod:`sqlite3` module is extensible in two ways: you can
@@ -669,7 +667,7 @@
 As described before, SQLite supports only a limited set of types natively. To
 use other Python types with SQLite, you must **adapt** them to one of the
 sqlite3 module's supported types for SQLite: one of NoneType, int, float,
-str, bytes, buffer.
+str, bytes.
 
 The :mod:`sqlite3` module uses Python object adaptation, as described in
 :pep:`246` for this.  The protocol to use is :class:`PrepareProtocol`.


More information about the Python-checkins mailing list