Mike Bayer [Fri, 28 Dec 2018 14:33:07 +0000 (09:33 -0500)]
Add missing disambiguation to non-primary mapper example
The mapping to B over a join defines an alternate primary key
based on all the primary key columns in the join unless we
re-define it explicitly. Similarly, people expect that
``.id`` looks the same. make sure these line up with the
old mapping.
Mike Bayer [Fri, 7 Dec 2018 19:01:23 +0000 (14:01 -0500)]
Add versioned_update_old_row example
A modification to the "turn UPDATE into INSERT" recipe that
also UPDATEs the previous row. The example is using timestamps
to maintain a relationship between two objects.
Mike Bayer [Tue, 6 Nov 2018 20:13:03 +0000 (15:13 -0500)]
Improve documentation re: Session.binds and partitioning strategies
Update documentation to include background on arbitrary superclass
usage, add full cross-linking between all related methods and parameters.
De-emphasize "twophase" and document that it is not well-supported
in drivers.
Mike Bayer [Thu, 25 Jan 2018 21:11:29 +0000 (16:11 -0500)]
Add a new FAQ section explaining how to ensure parenthesis
with op().
Not sure if this can be further improved at some point, such
as if a BinaryExpression automatically applied self_group()
when op() is called, however for the moment op() behaves consistently
as with all other operators without any ad-hoc effects.
Mike Bayer [Wed, 24 Jan 2018 23:03:04 +0000 (18:03 -0500)]
Rework synonym, synonym_for documentation
The map_column example was incorrect, and overall the purpose
of this parameter as well as that of synonym_for was not explained;
examples added along with more encouragement to use hybrids.
Mike Bayer [Tue, 26 Sep 2017 00:00:20 +0000 (20:00 -0400)]
Document and test __table_cls__
A use case has been identified for __table_cls__, which was
added in 1.0 just for the purpose of test fixtures. Add this to
public API and ensure the target use case (conditional table generation)
stays supported.
Mike Bayer [Thu, 31 Aug 2017 20:22:52 +0000 (16:22 -0400)]
- pin on cx_Oracle 6.0.1 for the moment while we wait for
either https://github.com/oracle/python-cx_Oracle/issues/75
to be fixed or we can merge a workaround
Mike Bayer [Fri, 1 Sep 2017 16:31:38 +0000 (12:31 -0400)]
Add InternalError for mysqlclient disconnect
mysqlclient as of 1.3.11 changed the exception
class for a particular disconnect situation from
InterfaceError to InternalError; the disconnection
detection logic now accommodates this.
Mike Bayer [Tue, 23 May 2017 14:17:51 +0000 (10:17 -0400)]
Remove twophase for cx_Oracle 6.x
Support for two-phase transactions has been removed entirely for
cx_Oracle when version 6.0b1 or later of the DBAPI is in use. The two-
phase feature historically has never been usable under cx_Oracle 5.x in
any case, and cx_Oracle 6.x has removed the connection-level "twophase"
flag upon which this feature relied.
Mike Bayer [Tue, 9 May 2017 16:17:04 +0000 (12:17 -0400)]
use regexp to parse cx_oracle version string
Fixed bug in cx_Oracle dialect where version string parsing would
fail for cx_Oracle version 6.0b1 due to the "b" character. Version
string parsing is now via a regexp rather than a simple split.
Mike Bayer [Fri, 18 Aug 2017 17:04:14 +0000 (13:04 -0400)]
First level repair for cx_Oracle 6.0 test regressions
Fixed more regressions caused by cx_Oracle 6.0; at the moment, the only
behavioral change for users is disconnect detection now detects for
cx_Oracle.DatabaseError in addition to cx_Oracle.InterfaceError, as
this behavior seems to have changed. Other issues regarding numeric
precision and uncloseable connections are pending with the upstream
cx_Oracle issue tracker.
Mike Bayer [Tue, 22 Aug 2017 17:12:43 +0000 (13:12 -0400)]
- allow a separate template database to be used for
PG CREATE DATABASE. as nobody will connect to it that would
solve the contention issue here
- backport --nomemory since tox.ini is using it
Mike Bayer [Fri, 28 Jul 2017 19:05:25 +0000 (15:05 -0400)]
Revert cx_Oracle WITH_UNICODE change under > 5.0
Fixed performance regression caused by the fix for :ticket:`3937` where
cx_Oracle as of version 5.3 dropped the ``.UNICODE`` symbol from its
namespace, which was interpreted as cx_Oracle's "WITH_UNICODE" mode being
turned on unconditionally, which invokes functions on the SQLAlchemy
side which convert all strings to unicode unconditionally and causing
a performance impact. In fact, per cx_Oracle's author the
"WITH_UNICODE" mode has been removed entirely as of 5.1, so the expensive unicode
conversion functions are no longer necessary and are disabled if
cx_Oracle 5.1 or greater is detected under Python 2. The warning against
"WITH_UNICODE" mode that was removed under :ticket:`3937` is also restored.
Mike Bayer [Sat, 22 Jul 2017 20:32:01 +0000 (16:32 -0400)]
- move to file-per-changelog for unreleased change notes,
so that we no longer have to rely upon merges within
the changelog files. because gerrit doesn't allow us
to use custom merge engines unlike git, we have no ability
to merge multiple changes into the changelog files without
going through conflicts. new version of changelog
in git supports these new patterns.
Tom Sitter [Wed, 12 Jul 2017 15:54:25 +0000 (11:54 -0400)]
Replace Session class with session instance
The Session class was used instead of the session instance which resulted in an attribute error.
(cherry picked from commit 43f41fbfaa8f3030148c131628c5e9fe8fda9f66)
Mike Bayer [Tue, 16 May 2017 13:51:06 +0000 (09:51 -0400)]
modernize and repair inheritance examples
remarkably, the examples for concrete and single were still
using classical mappings. Ensure all three examples use
modern declarative patterns, each illustrate the identical set
of query operations. Use back_populates, flat=True for joins,
etc. ensure flake8 linting, correct links and add a link back
from newly reworked inheritance documentation.
Mike Bayer [Fri, 12 May 2017 13:23:44 +0000 (09:23 -0400)]
Add links to with_only_columns to Select.column, append_column
Provide a brief example for these two methods
indicating that typically a table-bound (or other selectable)
column is appended here, then link to with_only_columns
documentation which has in-depth guidelines already including
that one should not append columns from the current select to itself.
Mike Bayer [Mon, 1 May 2017 17:04:32 +0000 (13:04 -0400)]
Update inheritance documentation.
The inheritance documentation is confused, disorganized, and out
of date. Reorganize and clarify, in particular in preparation
for new inheritance features.
Mike Bayer [Fri, 5 May 2017 18:59:39 +0000 (14:59 -0400)]
- big rewrite of the Sequence documentation:
1. Sequence should be associated with MetaData always,
except in the really weird case someone is sharing a Sequence
among multiple metadatas. Make this a "best practice", end the
confusion of #3951, #3979
2. "optional" is not a thing people use, trim this way down
Mike Bayer [Fri, 5 May 2017 14:39:18 +0000 (10:39 -0400)]
- add another note re: 339e2c13b0fc8e95a47d00c0f8fc5afc4b6dff9a
which clarifies that ForeignKey circumvents this logic as a
"convenience". issue #3978 is updated to address trying to make
this consistent.
Mike Bayer [Mon, 24 Apr 2017 20:19:08 +0000 (16:19 -0400)]
test / document postgresql_ops against a labeled expression
Since postgresql_ops explicitly states that it expects
string keys, to apply to a function call or expression one
needs to give the SQL expression a label that can be referred
to by name in the dictionary. test / document this.