diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-04-26 10:59:34 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-05-01 22:37:59 -0400 |
| commit | f247bb20007190ae7aa89929c02c03317b1e6876 (patch) | |
| tree | d03bc02056b96ea399cf947fe2074fa4365361ff /lib/sqlalchemy/dialects | |
| parent | ea87d39d7a9926dc1c6bf3d70e8faf8575769cb0 (diff) | |
| download | sqlalchemy-f247bb20007190ae7aa89929c02c03317b1e6876.tar.gz | |
Documentation updates for ResultProxy -> Result
This is based off of
I8091919d45421e3f53029b8660427f844fee0228 and includes
all documentation-only changes as a separate merge,
once the parent is merged.
Change-Id: I711adea23df0f9f0b1fe7c76210bd2de6d31842d
Diffstat (limited to 'lib/sqlalchemy/dialects')
| -rw-r--r-- | lib/sqlalchemy/dialects/firebird/base.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/firebird/fdb.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/sqlite/base.py | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/firebird/base.py b/lib/sqlalchemy/dialects/firebird/base.py index b7260403a..f6d50023b 100644 --- a/lib/sqlalchemy/dialects/firebird/base.py +++ b/lib/sqlalchemy/dialects/firebird/base.py @@ -49,12 +49,12 @@ of hanging transactions is a non-fully consumed result set, i.e.:: row = result.fetchone() return -Where above, the ``ResultProxy`` has not been fully consumed. The +Where above, the ``CursorResult`` has not been fully consumed. The connection will be returned to the pool and the transactional state rolled back once the Python garbage collector reclaims the objects which hold onto the connection, which often occurs asynchronously. The above use case can be alleviated by calling ``first()`` on the -``ResultProxy`` which will fetch the first row and immediately close +``CursorResult`` which will fetch the first row and immediately close all remaining cursor/connection resources. RETURNING support diff --git a/lib/sqlalchemy/dialects/firebird/fdb.py b/lib/sqlalchemy/dialects/firebird/fdb.py index 7a7b87536..a20aab8d8 100644 --- a/lib/sqlalchemy/dialects/firebird/fdb.py +++ b/lib/sqlalchemy/dialects/firebird/fdb.py @@ -29,7 +29,7 @@ accept every argument that Kinterbasdb does. the usage of "cursor.rowcount" with the Kinterbasdb dialect, which SQLAlchemy ordinarily calls upon automatically after any UPDATE or DELETE statement. When disabled, SQLAlchemy's - ResultProxy will return -1 for result.rowcount. The rationale here is + CursorResult will return -1 for result.rowcount. The rationale here is that Kinterbasdb requires a second round trip to the database when .rowcount is called - since SQLA's resultproxy automatically closes the cursor after a non-result-returning statement, rowcount must be diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 38f3fa611..dca7b9a00 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -469,7 +469,7 @@ This setting is currently hardcoded. .. seealso:: - :attr:`_engine.ResultProxy.rowcount` + :attr:`_engine.CursorResult.rowcount` CAST Support diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 61cb19c34..a85a36bb7 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -206,7 +206,7 @@ reflection process as follows:: ... referring = Table('referring', meta, ... autoload=True, autoload_with=conn) ... - <sqlalchemy.engine.result.ResultProxy object at 0x101612ed0> + <sqlalchemy.engine.result.CursorResult object at 0x101612ed0> The above process would deliver to the :attr:`_schema.MetaData.tables` collection @@ -228,7 +228,7 @@ dialect-specific argument to both :class:`_schema.Table` as well as ... autoload_with=conn, ... postgresql_ignore_search_path=True) ... - <sqlalchemy.engine.result.ResultProxy object at 0x1016126d0> + <sqlalchemy.engine.result.CursorResult object at 0x1016126d0> We will now have ``test_schema.referred`` stored as schema-qualified:: diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 769fbb06a..1eaf63ff3 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -23,7 +23,7 @@ psycopg2-specific keyword arguments which are accepted by ``connection.cursor('some name')``, which has the effect that result rows are not immediately pre-fetched and buffered after statement execution, but are instead left on the server and only retrieved as needed. SQLAlchemy's - :class:`~sqlalchemy.engine.ResultProxy` uses special row-buffering + :class:`~sqlalchemy.engine.CursorResult` uses special row-buffering behavior when this feature is enabled, such that groups of 100 rows at a time are fetched over the wire to reduce conversational overhead. Note that the :paramref:`.Connection.execution_options.stream_results` @@ -137,7 +137,7 @@ in addition to those not specific to DBAPIs: * ``max_row_buffer`` - when using ``stream_results``, an integer value that specifies the maximum number of rows to buffer at a time. This is - interpreted by the :class:`.BufferedRowResultProxy`, and if omitted the + interpreted by the :class:`.BufferedRowCursorResult`, and if omitted the buffer will grow to ultimately store 1000 rows at a time. .. versionchanged:: 1.4 The ``max_row_buffer`` size can now be greater than diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index dbc8c5e7f..38d819a09 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -558,9 +558,9 @@ names are still addressable*:: 1 Therefore, the workaround applied by SQLAlchemy only impacts -:meth:`_engine.ResultProxy.keys` and :meth:`.Row.keys()` in the public API. In +:meth:`_engine.CursorResult.keys` and :meth:`.Row.keys()` in the public API. In the very specific case where an application is forced to use column names that -contain dots, and the functionality of :meth:`_engine.ResultProxy.keys` and +contain dots, and the functionality of :meth:`_engine.CursorResult.keys` and :meth:`.Row.keys()` is required to return these dotted names unmodified, the ``sqlite_raw_colnames`` execution option may be provided, either on a per-:class:`_engine.Connection` basis:: |
