]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Documentation fixes (#9747)
authorF.D.Castel <fdcastel@gmail.com>
Fri, 26 May 2023 19:27:17 +0000 (16:27 -0300)
committerGitHub <noreply@github.com>
Fri, 26 May 2023 19:27:17 +0000 (21:27 +0200)
* Fix typos.

* Adjust FAQ entries about SQLite connection pooling in SQLALchemy 2.0.

* Rephrase.

* Changes suggested by @zzzeek.

doc/build/faq/connections.rst
lib/sqlalchemy/testing/requirements.py

index b0c354c00c31474ab7a5fccc18e4bad1215311ff..66e878c8980f8e61625fff4e7df7c88135e0977f 100644 (file)
@@ -16,8 +16,9 @@ How do I pool database connections?   Are my connections pooled?
 ----------------------------------------------------------------
 
 SQLAlchemy performs application-level connection pooling automatically
-in most cases.  With the exception of SQLite, a :class:`_engine.Engine` object
-refers to a :class:`.QueuePool` as a source of connectivity.
+in most cases.  For all included dialects (except SQLite when using a 
+"memory" database), a :class:`_engine.Engine` object refers to a 
+:class:`.QueuePool` as a source of connectivity.
 
 For more detail, see :ref:`engines_toplevel` and :ref:`pooling_toplevel`.
 
@@ -392,13 +393,12 @@ a COMMIT as any connection is returned to the pool::
 I am using multiple connections with a SQLite database (typically to test transaction operation), and my test program is not working!
 ----------------------------------------------------------------------------------------------------------------------------------------------------------
 
-If using a SQLite ``:memory:`` database, or a version of SQLAlchemy prior
-to version 0.7, the default connection pool is the :class:`.SingletonThreadPool`,
-which maintains exactly one SQLite connection per thread.  So two
-connections in use in the same thread will actually be the same SQLite
-connection.   Make sure you're not using a :memory: database and
-use :class:`.NullPool`, which is the default for non-memory databases in
-current SQLAlchemy versions.
+If using a SQLite ``:memory:`` database the default connection pool is the 
+:class:`.SingletonThreadPool`, which maintains exactly one SQLite connection
+per thread.  So two connections in use in the same thread will actually be 
+the same SQLite connection.  Make sure you're not using a :memory: database
+so that the engine will use :class:`.QueuePool` (the default for non-memory 
+databases in current SQLAlchemy versions).
 
 .. seealso::
 
index 6fb629bf9530f77749450a4775017d0de36a3892..45568eac4f24cccde3bf32eb7697422831fffd2a 100644 (file)
@@ -549,7 +549,7 @@ class SuiteRequirements(Requirements):
 
     @property
     def foreign_key_constraint_name_reflection(self):
-        """Target supports refleciton of FOREIGN KEY constraints and
+        """Target supports reflection of FOREIGN KEY constraints and
         will return the name of the constraint that was used in the
         "CONSTRAINT <name> FOREIGN KEY" DDL.
 
@@ -664,7 +664,7 @@ class SuiteRequirements(Requirements):
 
     @property
     def constraint_comment_reflection(self):
-        """indicates if the database support constraint on constraints
+        """indicates if the database support comments on constraints
         and their reflection"""
         return exclusions.closed()