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
Added alias method "dedicated_connection" for "connection(shareable=False)". Exceptions in destructors are now caught and silently ignored. These can occur when instances are not yet fully initialized or referenced objects are already destroyed.
<trclass="field"><thclass="docinfo-name">Translations:</th><tdclass="field-body"><aclass="reference" href="UsersGuide.html">English</a> German <aclass="reference" href="UsersGuide.zh.html">Chinese</a></td>
erzeugt, oder ein DB-API-2-Datenbankadapter-Modul</p>
303
303
</li>
304
304
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">maxusage</span></tt>: Obergrenze dafür, wie oft eine einzelne Verbindung
305
-
wiederverwendet werden darf (der Standardwert <ttclass="docutils literal"><spanclass="pre">0</span></tt> oder <ttclass="docutils literal"><spanclass="pre">False</span></tt>
305
+
wiederverwendet werden darf (der Standardwert <ttclass="docutils literal"><spanclass="pre">0</span></tt> oder <ttclass="docutils literal"><spanclass="pre">None</span></tt>
306
306
bedeutet unbegrenzte Wiederverwendung)</p>
307
307
<p>Sobald diese Obergrenze erreicht wird, wird die Verbindung zurückgesetzt.</p>
308
308
</li>
309
309
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">setsession</span></tt>: eine optionale Liste von SQL-Befehlen zur Initialisierung
310
310
der Datenbanksitzung, z.B. <ttclass="docutils literal"><spanclass="pre">["set</span><spanclass="pre">datestyle</span><spanclass="pre">to</span><spanclass="pre">german",</span><spanclass="pre">...]</span></tt></p>
311
311
</li>
312
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">failures</span></tt>: eine optionale Exception-Klasse oder ein Tupel von Exceptions
313
+
bei denen die Ausfallsicherung zum Tragen kommen soll, falls die Vorgabe
314
+
(OperationalError, InternalError) nicht geeignet sein sollte</p>
315
+
</li>
316
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">closeable</span></tt>: wenn dies auf <ttclass="docutils literal"><spanclass="pre">True</span></tt> gesetzt wird, dann wird das Schließen
317
+
von Verbindungen erlaubt, normalerweise wird es jedoch ignoriert</p>
318
+
</li>
312
319
<li><pclass="first">Die als <ttclass="docutils literal"><spanclass="pre">creator</span></tt> angegebene Funktion oder die Funktion <ttclass="docutils literal"><spanclass="pre">connect</span></tt>
313
320
des DB-API-2-Datenbankadapter-Moduls erhalten alle weiteren Parameter,
314
321
wie <ttclass="docutils literal"><spanclass="pre">host</span></tt>, <ttclass="docutils literal"><spanclass="pre">database</span></tt>, <ttclass="docutils literal"><spanclass="pre">user</span></tt>, <ttclass="docutils literal"><spanclass="pre">password</span></tt> usw. Sie können einige
die insgesamt überhaupt erlaubt werden sollen (der Standardwert <ttclass="docutils literal"><spanclass="pre">0</span></tt>
367
374
bedeutet unbegrenzte Anzahl von Datenbankverbindungen)</p>
368
375
</li>
369
-
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">blocking</span></tt>: bestimmt das Verhalten, wenn diese Obergrenze überschritten
370
-
wird (der Standardwert<ttclass="docutils literal"><spanclass="pre">0</span></tt>oder <ttclass="docutils literal"><spanclass="pre">False</span></tt> bedeutet, dass eine Fehlermeldung
371
-
ausgegeben wird, andernfalls wird blockiert und gewartet, bis die Anzahl
372
-
an Datenbankverbindungen wieder abnimmt)</p>
376
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">blocking</span></tt>: bestimmt das Verhalten bei Überschreitung dieser Obergrenze</p>
377
+
<p>Wenn dies auf<ttclass="docutils literal"><spanclass="pre">True</span></tt>gesetzt wird, dann wird so lange gewartet, bis die
378
+
Anzahl an Datenbankverbindungen wieder abnimmt, normalerweise wird jedoch
379
+
sofort eine Fehlermeldung ausgegeben.</p>
373
380
</li>
374
381
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">maxusage</span></tt>: Obergrenze dafür, wie oft eine einzelne Verbindung
375
-
wiederverwendet werden darf (der Standardwert <ttclass="docutils literal"><spanclass="pre">0</span></tt> oder <ttclass="docutils literal"><spanclass="pre">False</span></tt>
382
+
wiederverwendet werden darf (der Standardwert <ttclass="docutils literal"><spanclass="pre">0</span></tt> oder <ttclass="docutils literal"><spanclass="pre">None</span></tt>
376
383
bedeutet unbegrenzte Wiederverwendung)</p>
377
384
<p>Sobald diese Obergrenze erreicht wird, wird die Verbindung automatisch
378
385
zurückgesetzt (geschlossen und wieder neu geöffnet).</p>
379
386
</li>
380
387
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">setsession</span></tt>: eine optionale Liste von SQL-Befehlen zur Initialisierung
381
388
der Datenbanksitzung, z.B. <ttclass="docutils literal"><spanclass="pre">["set</span><spanclass="pre">datestyle</span><spanclass="pre">to</span><spanclass="pre">german",</span><spanclass="pre">...]</span></tt></p>
382
389
</li>
390
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">failures</span></tt>: eine optionale Exception-Klasse oder ein Tupel von Exceptions
391
+
bei denen die Ausfallsicherung zum Tragen kommen soll, falls die Vorgabe
392
+
(OperationalError, InternalError) nicht geeignet sein sollte</p>
393
+
</li>
383
394
<li><pclass="first">Die als <ttclass="docutils literal"><spanclass="pre">creator</span></tt> angegebene Funktion oder die Funktion <ttclass="docutils literal"><spanclass="pre">connect</span></tt>
384
395
des DB-API-2-Datenbankadapter-Moduls erhalten alle weiteren Parameter,
385
396
wie <ttclass="docutils literal"><spanclass="pre">host</span></tt>, <ttclass="docutils literal"><spanclass="pre">database</span></tt>, <ttclass="docutils literal"><spanclass="pre">user</span></tt>, <ttclass="docutils literal"><spanclass="pre">password</span></tt> usw. Sie können einige
connection objects or a DB-API 2 compliant database module</p>
284
284
</li>
285
285
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">maxusage</span></tt>: the maximum number of reuses of a single connection
286
-
(the default of <ttclass="docutils literal"><spanclass="pre">0</span></tt> or <ttclass="docutils literal"><spanclass="pre">False</span></tt> means unlimited reuse)</p>
286
+
(the default of <ttclass="docutils literal"><spanclass="pre">0</span></tt> or <ttclass="docutils literal"><spanclass="pre">None</span></tt> means unlimited reuse)</p>
287
287
<p>Whenever the limit is reached, the connection will be reset.</p>
288
288
</li>
289
289
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">setsession</span></tt>: an optional list of SQL commands that may serve to
290
290
prepare the session, e.g. <ttclass="docutils literal"><spanclass="pre">["set</span><spanclass="pre">datestyle</span><spanclass="pre">to</span><spanclass="pre">german",</span><spanclass="pre">...]</span></tt></p>
291
291
</li>
292
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">failures</span></tt>: an optional exception class or a tuple of exception classes
293
+
for which the connection failover mechanism shall be applied,
294
+
if the default (OperationalError, InternalError) is not adequate</p>
295
+
</li>
296
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">closeable</span></tt>: if this is set to true, then closing connections will
297
+
be allowed, but by default this will be silently ignored</p>
298
+
</li>
292
299
<li><pclass="first">The creator function or the connect function of the DB-API 2 compliant
293
300
database module specified as the creator will receive any additional
294
301
parameters such as the host, database, user, password etc. You may
ignored since it would be reopened at the next usage anyway and
316
323
contrary to the intent of having persistent connections. Instead,
317
324
the connection will be automatically closed when the thread dies.
318
-
You can change this behavior be setting <ttclass="docutils literal"><spanclass="pre">persist._closeable</span></tt> to <ttclass="docutils literal"><spanclass="pre">True</span></tt>.</p>
325
+
You can change this behavior be setting the <ttclass="docutils literal"><spanclass="pre">closeable</span></tt> parameter.</p>
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">maxconnections</span></tt>: maximum number of connections generally allowed
341
348
(the default value of <ttclass="docutils literal"><spanclass="pre">0</span></tt> means any number of connections)</p>
342
349
</li>
343
-
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">blocking</span></tt>: determines behavior when exceeding the maximum
344
-
(the default of <ttclass="docutils literal"><spanclass="pre">0</span></tt> or <ttclass="docutils literal"><spanclass="pre">False</span></tt> means report an error; otherwise
345
-
block and wait until the number of connections decreases)</p>
350
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">blocking</span></tt>: determines behavior when exceeding the maximum</p>
351
+
<p>If this is set to true, block and wait until the number of
352
+
connections decreases, but by default an error will be reported.</p>
346
353
</li>
347
354
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">maxusage</span></tt>: maximum number of reuses of a single connection
348
-
(the default of <ttclass="docutils literal"><spanclass="pre">0</span></tt> or <ttclass="docutils literal"><spanclass="pre">False</span></tt> means unlimited reuse)</p>
355
+
(the default of <ttclass="docutils literal"><spanclass="pre">0</span></tt> or <ttclass="docutils literal"><spanclass="pre">None</span></tt> means unlimited reuse)</p>
349
356
<p>When this maximum usage number of the connection is reached,
350
357
the connection is automatically reset (closed and reopened).</p>
351
358
</li>
352
359
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">setsession</span></tt>: an optional list of SQL commands that may serve to
353
360
prepare the session, e.g. <ttclass="docutils literal"><spanclass="pre">["set</span><spanclass="pre">datestyle</span><spanclass="pre">to</span><spanclass="pre">german",</span><spanclass="pre">...]</span></tt></p>
354
361
</li>
362
+
<li><pclass="first"><ttclass="docutils literal"><spanclass="pre">failures</span></tt>: an optional exception class or a tuple of exception classes
363
+
for which the connection failover mechanism shall be applied,
364
+
if the default (OperationalError, InternalError) is not adequate</p>
365
+
</li>
355
366
<li><pclass="first">The creator function or the connect function of the DB-API 2 compliant
356
367
database module specified as the creator will receive any additional
357
368
parameters such as the host, database, user, password etc. You may
0 commit comments