You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ to a database that can be used in all kinds of multi-threaded environments.
7
7
The suite supports DB-API 2 compliant database interfaces
8
8
and the classic PyGreSQL interface.
9
9
10
-
The current version 3.0.2 of DBUtils supports Python versions 3.6 to 3.10.
10
+
The current version 3.0.3 of DBUtils supports Python versions 3.6 to 3.11.
11
11
12
12
**Please have a look at the [changelog](https://webwareforpython.github.io/DBUtils/changelog.html), because there were some breaking changes in version 2.0.**
<li><p><aclass="reference internal" href="#copyright-and-license" id="toc-entry-22">Copyright and License</a></p></li>
53
54
</ul>
54
55
</nav>
55
56
<sectionid="synopsis">
@@ -133,7 +134,7 @@ <h3>Installation</h3>
133
134
</section>
134
135
<sectionid="requirements">
135
136
<h2>Requirements</h2>
136
-
<p>DBUtils supports <aclass="reference external" href="https://www.python.org">Python</a> versions 3.6 to 3.10.</p>
137
+
<p>DBUtils supports <aclass="reference external" href="https://www.python.org">Python</a> versions 3.6 to 3.11.</p>
137
138
<p>The modules in the classic PyGreSQL variant need <aclass="reference external" href="https://www.pygresql.org/">PyGreSQL</a> version 4.0
138
139
or above, while the modules in the universal DB-API 2 variant run with
139
140
any Python <aclass="reference external" href="https://www.python.org/dev/peps/pep-0249/">DB-API 2</a> compliant database interface module.</p>
@@ -337,7 +338,7 @@ <h3>PooledDB (pooled_db)</h3>
337
338
<li><p><spanclass="docutils literal">setsession</span>: an optional list of SQL commands that may serve to
338
339
prepare the session, e.g. <spanclass="docutils literal">["set datestyle to german", <spanclass="pre">...]</span></span></p></li>
339
340
<li><p><spanclass="docutils literal">reset</span>: how connections should be reset when returned to the pool
340
-
(<spanclass="docutils literal">False</span> or <spanclass="docutils literal">None</span> to rollback transcations started with <spanclass="docutils literal">begin()</span>,
341
+
(<spanclass="docutils literal">False</span> or <spanclass="docutils literal">None</span> to rollback transactions started with <spanclass="docutils literal">begin()</span>,
341
342
the default value <spanclass="docutils literal">True</span> always issues a rollback for safety's sake)</p></li>
342
343
<li><p><spanclass="docutils literal">failures</span>: an optional exception class or a tuple of exception classes
343
344
for which the connection failover mechanism shall be applied,
back before being given back to the connection pool.</p>
397
398
</section>
398
399
</section>
400
+
<sectionid="advanced-usage">
401
+
<h2>Advanced Usage</h2>
402
+
<p>Sometimes you may want to prepare connections before they are used by
403
+
DBUtils, in ways that are not possible by just using the right parameters.
404
+
For instance, <spanclass="docutils literal">pyodbc</span> may require to configure connections by calling
405
+
the <spanclass="docutils literal">setencoding()</span> method of the connection. You can do this by passing
406
+
a modified <spanclass="docutils literal">connect()</span> function to <spanclass="docutils literal">PersistentDB</span> or <spanclass="docutils literal">PooledDB</span> as
407
+
<spanclass="docutils literal">creator</span> (the first argument), like this:</p>
0 commit comments