diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-03-21 13:53:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 13:53:28 (GMT) |
commit | b146568dfcbcd7409c724f8917e4f77433dd56e4 (patch) | |
tree | 716efcf61f1bef4887ca6c6db39ea0f8d49b8c57 /Doc | |
parent | 684d2b9a071fa8e54749e0eec3c16aafcd642ed4 (diff) | |
download | cpython-b146568dfcbcd7409c724f8917e4f77433dd56e4.zip cpython-b146568dfcbcd7409c724f8917e4f77433dd56e4.tar.gz cpython-b146568dfcbcd7409c724f8917e4f77433dd56e4.tar.bz2 |
bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. (GH-18942)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/sqlite3.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 67ea2b1..314d3a5 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -165,9 +165,10 @@ Module functions and constants that 'mytype' is the type of the column. It will try to find an entry of 'mytype' in the converters dictionary and then use the converter function found there to return the value. The column name found in :attr:`Cursor.description` - is only the first word of the column name, i. e. if you use something like - ``'as "x [datetime]"'`` in your SQL, then we will parse out everything until the - first blank for the column name: the column name would simply be "x". + does not include the type, i. e. if you use something like + ``'as "Expiration date [datetime]"'`` in your SQL, then we will parse out + everything until the first ``'['`` for the column name and strip + the preceeding space: the column name would simply be "Expiration date". .. function:: connect(database[, timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements, uri]) |