Skip to content

Commit 09a36cd

Browse files
authored
bpo-41724: Explain when the conversion is not possible with detect_types enabled (GH-23855)
* Explain when the conversion is not possible with detect_types enabled
1 parent c56f9df commit 09a36cd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Doc/library/sqlite3.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ Module functions and constants
198198

199199
*detect_types* defaults to 0 (i. e. off, no type detection), you can set it to
200200
any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` to turn
201-
type detection on.
201+
type detection on. Due to SQLite behaviour, types can't be detected for generated
202+
fields (for example ``max(data)``), even when *detect_types* parameter is set. In
203+
such case, the returned type is :class:`str`.
202204

203205
By default, *check_same_thread* is :const:`True` and only the creating thread may
204206
use the connection. If set :const:`False`, the returned connection may be shared

0 commit comments

Comments
 (0)