@@ -290,9 +290,6 @@ Module functions
290290       :const: `PARSE_DECLTYPES ` and :const: `PARSE_COLNAMES `
291291       to enable this.
292292       Column names takes precedence over declared types if both flags are set.
293-        Types cannot be detected for generated fields (for example ``max(data) ``),
294-        even when the *detect_types * parameter is set; :class: `str ` will be
295-        returned instead.
296293       By default (``0 ``), type detection is disabled.
297294
298295   :param isolation_level: 
@@ -436,21 +433,6 @@ Module constants
436433   old style (pre-Python 3.12) transaction control behaviour.
437434   See :ref: `sqlite3-transaction-control-isolation-level ` for more information.
438435
439- .. data :: PARSE_COLNAMES 
440- 
441-    Pass this flag value to the *detect_types * parameter of
442-    :func: `connect ` to look up a converter function by
443-    using the type name, parsed from the query column name,
444-    as the converter dictionary key.
445-    The type name must be wrapped in square brackets (``[] ``).
446- 
447-    .. code-block :: sql 
448- 
449-       SELECT p as "p [point]" FROM test;  ! will look up converter "point" 
450- 
451- :const: `PARSE_DECLTYPES ` using the ``| ``
452-    (bitwise or) operator.
453- 
454436.. data :: PARSE_DECLTYPES 
455437
456438   Pass this flag value to the *detect_types * parameter of
@@ -472,6 +454,27 @@ Module constants
472454:const: `PARSE_COLNAMES ` using the ``| ``
473455   (bitwise or) operator.
474456
457+    .. note ::
458+ 
459+       Generated fields (for example ``MAX(p) ``) are returned as :class: `str `.
460+       Use :const: `!PARSE_COLNAMES ` to enforce types for such queries.
461+ 
462+ .. data :: PARSE_COLNAMES 
463+ 
464+    Pass this flag value to the *detect_types * parameter of
465+    :func: `connect ` to look up a converter function by
466+    using the type name, parsed from the query column name,
467+    as the converter dictionary key.
468+    The query column name must be wrapped in double quotes (``" ``)
469+    and the type name must be wrapped in square brackets (``[] ``).
470+ 
471+    .. code-block :: sql 
472+ 
473+       SELECT MAX(p) as "p [point]" FROM test;  ! will look up converter "point" 
474+ 
475+ :const: `PARSE_DECLTYPES ` using the ``| ``
476+    (bitwise or) operator.
477+ 
475478.. data :: SQLITE_OK 
476479          SQLITE_DENY
477480          SQLITE_IGNORE
0 commit comments