Skip to content

Commit c945847

Browse files
committed
Add docs on changing the dialect
As this isn't clear otherwise.
1 parent 2046f74 commit c945847

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ In addition for conditionals the values ``IsNull`` (or
7171
``RewritingValue.IS_NOT_NULL``) can be used to rewrite the conditional
7272
as expected. This is useful as ``x = NULL`` is always false in SQL.
7373

74+
Paramstyle (dialect)
75+
--------------------
76+
77+
By default SQL-tString uses the ``qmark`` `paramstyle
78+
<https://peps.python.org/pep-0249/#paramstyle>`_ (dialect) but also
79+
supports the ``$`` paramstyle or asyncpg dialect. This is best changed
80+
globally via,
81+
82+
.. code-block:: python
83+
84+
from sql_tstring import Context, set_context
85+
86+
set_context(Context(dialect="asyncpg"))
87+
7488
Pre Python 3.14 usage
7589
---------------------
7690

0 commit comments

Comments
 (0)