Commit Graph

2867 Commits

Author SHA1 Message Date
Mike Bayer befe7ffcb8 use ..deprecated directive w/ version in all cases
These changes should be ported from 1.3 back to 1.0 or
possibly 0.9 to the extent they are relevant in each
version. In 1.3 we hope to turn all deprecation documentation
into warnings.

(cherry picked from commit 77e9534673d58f2f4c33d16c0ed4e8671cea48b6)
(cherry picked from commit dcfe5a3f8929a11fd8d89b3b34449e1894bb2a3b)

Change-Id: I205186cde161af9389af513a425c62ce90dd54d8
2019-01-12 18:14:21 -05:00
Charles S. Givre 6c6b63b26e Update index.rst - Added link to Drill dialect.
Added link to Apache Drill dialect.

(cherry picked from commit 86f243a874)
2019-01-09 10:33:03 -05:00
Lele Gaifax 74838dda2f commit 1b774808c926665047bf353222ecd191679a95d1
Author: Lele Gaifax <lele@metapensiero.it>
Date:   Tue Dec 25 12:35:41 2018 +0100

    Consistently use "PostgreSQL", fixing also a few doc glitches

commit 0e382aaee4427193926f0dc10ad29056bc12c85e
Author: Lele Gaifax <lele@metapensiero.it>
Date:   Tue Dec 25 12:08:49 2018 +0100

    Remove duplicated words

Change-Id: Iaa586b9412f46a50fe6ff3bbb92e07d6cb1905c8
(cherry picked from commit c0f9708fde)
(cherry picked from commit 7ec092063a)
2018-12-30 21:23:37 -05:00
Mike Bayer f60a24a4e8 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.

Change-Id: I1ab064c57019e79c34293f6588d1e033f7083974
(cherry picked from commit 16f08cbed5)
2018-12-28 09:36:37 -05:00
Mike Bayer e9564a44e4 - remove non-working dialects some of which are 404's
- put the five major dialect names on the front page
- remove old change messages

Change-Id: Ibf1dc2c499f10f98efb6c97d6c53e442e7746200
(cherry picked from commit eae62d0004)
2018-12-24 00:10:27 -05:00
Mike Bayer b7ad656e06 Document and support nested composites
Composites can behave in a "nested" fashion by defining the
class in that way.   To make the constructor more convenient,
a callable can be passed to :func:`.composite` instead of the
class itself.  This works now, so add a test to ensure this
pattern remains available.

Change-Id: Ia009f274fca7269f41d6d824e0f70b6fb0ada081
(cherry picked from commit d4a130bb1b)
2018-12-12 12:56:57 -05:00
adriennefranke f54d61d68a Fixed typo in docs
Fixes: #4166
Fixes: #4399
Change-Id: I49494209463089114e77dfc737c811837d49ea20
(cherry picked from commit 09856b911b)
2018-12-05 20:32:21 -05:00
Mike Bayer c3272a32c9 All sphinx dependencies move under the github sqlalchemy organization
Change-Id: I7a0dc1ef320b6abad0eeac8b24c20f821e5b8c81
(cherry picked from commit 89f95e9bad)
2018-12-03 17:03:07 -05:00
Mike Bayer fcb4c96cd8 Move links etc. to github, new alembic links
Change-Id: I59392d355a216ae59552a04c5508f548b901aa7b
(cherry picked from commit 50417cf758)
(cherry picked from commit d04575c554)
2018-11-26 23:01:26 -05:00
Mike Bayer 161747fbe6 - remove @HEAD indicator from docs requirements, fixes #4375
Change-Id: I50b1622c2c2236bf9e436f61c7eea31faaeaa3e1
(cherry picked from commit b5cb68ac43)
2018-11-26 00:17:44 -05:00
Mike Bayer 4c75dead12 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.

Change-Id: Id99894bb62cc506e896c9aa7c256e9f6e602243e
(cherry picked from commit 1f13c8c833)
2018-11-06 15:14:51 -05:00
Mike Bayer f614a57e10 Add additional documentation for ORM fetched defaults
Add additional examples to the section first added as part
of #4317 to cover the use cases requested in #3921.

Fixes: #3921
Change-Id: I6ec283aa0a6fbabedef40bb4320751ab4cd990ea
(cherry picked from commit ffd27cef48)
2018-10-02 13:55:24 -04:00
Denis Kataev 5ce6c785ef Remove unnecessary unicode and raw string prefix
(cherry picked from commit fc5dbc3016)
2018-09-28 10:22:33 -04:00
Mike Bayer 0615c1ba48 Add non-primary mapper example illustrating a row-limited relationship
Change-Id: Ifcb3baa6b220e375dc029794dd10c111660eac94
(cherry picked from commit 888d122dcf)
2018-09-27 21:28:27 -04:00
Wouter Overmeire c630c42ffd Fix doc type
(cherry picked from commit 82006fcc93)
2018-09-17 09:21:03 -04:00
Mike Bayer 36fbc9a0c7 Correct for the INSERT statement, typos
Change-Id: I036f3eb9b5e591515920678bc9a76f707fda142c
(cherry picked from commit c85378d984)
2018-08-09 14:36:28 -04:00
Mike Bayer 7f6b272507 Write a much better section about server defaults
Include information about eager_defaults etc.  These
docs were written before we had all the features
we do now.

Change-Id: Ie62e58c5986698824f717e9f8c802b07a27517d4
Fixes: #4317
(cherry picked from commit 82dfcf43de)
2018-08-09 13:35:24 -04:00
Kevin Horn fb049d4d24 Replace 'with' with 'which'
(cherry picked from commit 8601e86f11)
2018-07-31 22:06:43 -04:00
Mike Bayer 4cf0a327c1 Document sticky behavior of loader options
References #4301

Change-Id: If921e3b8369e2cd5312b5964a99bcf7731b3ecfc
(cherry picked from commit 3cc832992d)
2018-07-10 13:32:06 -04:00
Mike Bayer 36369f0b74 - add some context to the declarative section indicating this is not
the introductory material for these topics

Change-Id: I358ba8c32520ce3950a727216bc019e33377e7b9
(cherry picked from commit 284009683d)
2018-07-05 00:06:15 -04:00
Mike Bayer b539d24c16 - fix linking for the query.rst page
Change-Id: I269fdd72e372e1bf4f0f85e9fc8e6938adc4f686
(cherry picked from commit b6fb6f6b60)
2018-07-04 17:49:59 -04:00
Andrew Gaul af14ea4a07 Remove stale ON UPDATE/ON DELETE comment.
SQLite supports both of these features.

(cherry picked from commit 6bb50e1293)
2018-06-19 22:39:39 -04:00
Mike Bayer e8650d0cfa update client-side/server-side SQL default expression documentation
These docs were inaccurate and verbose, try to modernize them
with up to date information and add cues to allow the reader
to understand them quickly.

Change-Id: I997d9b8963d90c73f5960fe29d8f1b5005299da7
(cherry picked from commit da5323c2fa)
2018-06-13 12:02:31 -04:00
Mike Bayer 49a8e464b6 - modernize versioning examples
- add new example versioned_rows_w_versionid

Change-Id: I592cd5eb7db50162b4c4ad6191813d9def2b6d7c
(cherry picked from commit 70f8f6a169)
2018-05-05 18:21:31 -04:00
Mike Bayer 835118b3e2 - add sap-hana
Change-Id: Id3ddd78fceb31df40c5f00f8b21320b0da8488af
(cherry picked from commit 21b6ec97318e87ab1bf36acf469eb9deb9823e0e)
2018-05-03 09:59:57 -04:00
Mike Bayer 9007b6052f Fix bindparam type param fixes #4220
Change-Id: I0f40bc3145d4cab1a12d2174b9f0f60b4ce736f5
(cherry picked from commit 55371f4cff)
2018-04-01 10:34:07 -04:00
Mike Bayer 0cc1206ea0 Link to the ExpireRelationshipOnFKChange recipe for deletes
The recipe now supports interception of delete() and a
corresponding update of related objects.

Change-Id: I2aa3bfdd477ceccff6cfb3e66ed73311705010c7
2018-03-26 18:11:36 -04:00
Mike Bayer 4022e41d88 Make it much more clear that concrete mapping is limited
Change-Id: Icb2ea787b0defbf5f1244b144759c1e8acff3f0f
(cherry picked from commit ea20a11817)
2018-03-07 18:05:48 -05:00
Mike Bayer 2ae99b671c Add notes regarding flat=True
Start documenting that flat=True and aliased=True don't work
with selectable particularly when selectable is an aliased select
already.  References #4212

Change-Id: I6e576165f06387350ae97e43ad979e575a4912b9
(cherry picked from commit 39d7dfa08a)
2018-03-07 16:03:58 -05:00
Mike Bayer e2aea6e3e2 Version 1.1.19 placeholder 2018-03-06 14:10:39 -05:00
Mike Bayer fb8e01a7df - 1.1.18 2018-03-06 14:04:26 -05:00
Mike Bayer cc6ec001b2 Only replace first occurrence for COLLATE/ARRAY syntax
Fixed bug in Postgresql COLLATE / ARRAY adjustment first introduced
in 🎫`4006` where new behaviors in Python 3.7 regular expressions
caused the fix to fail.

Change-Id: Ied3893d7cac210befa0277b55b3b895b0ba1f0d2
Fixes: #4208
(cherry picked from commit 7300469f71)
2018-03-05 15:53:06 -05:00
Mike Bayer 8064be5b00 Get MySQL version info from @@version
MySQL dialects now query the server version using ``SELECT @@version``
explicitly to the server to ensure we are getting the correct version
information back.   Proxy servers like MaxScale interfere with the value
that is passed to the DBAPI's connection.server_version value so this
is no longer reliable.

Change-Id: Iafd39be8c9bf1982d58b34cc997ae1016ad6c48c
Fixes: #4205
(cherry picked from commit 9ba77e8d3b682bff89fdab5e80271a96a52fe8c8)
(cherry picked from commit 5c1ebbc370)
2018-03-03 16:16:32 -05:00
Anton Vlasenko 6d975ec9ff Fix typo in python example
(cherry picked from commit 31d28179c2)
2018-02-27 14:46:47 -05:00
Mike Bayer ad1c56b3a2 Version 1.1.18 placeholder 2018-02-22 16:16:11 -05:00
Mike Bayer ee2e266256 - 1.1.17 2018-02-22 16:08:56 -05:00
Mike Bayer b37f007732 Default to using current mapped class as owner if none found
Repaired regression caused in 1.2.3 and 1.1.16 regarding association proxy
objects, revising the approach to 🎫`4185` when calculating the
"owning class" of an association proxy to default to choosing the current
class if the proxy object is not directly associated with a mapped class,
such as a mixin.

Change-Id: I87d0ac09f695dc285bd4bbe0a547f1d5ce23e068
Fixes: #4185
(cherry picked from commit 93881f7873048403b62cc3e179354712ba8e9282)
2018-02-20 16:42:24 -05:00
Mike Bayer de6488d75f Rewrite the "deleting from collections" section
This section documents an aspect of the ORM that is
more generalized than just collections as well as more general
than just using session.delete(), even though session.delete()
with collections is the most common use case.   Try to expand
out the scope here to explain the situation from the perspective
of any kind of relationship, include example with delete cascade
with many-to-one as well.

Change-Id: Ifacb91f90951d1b0da6dbadc2d72273d79b756e2
Fixes: #4191
2018-02-19 18:16:38 -05:00
Mike Bayer 1337d73421 Version 1.1.17 placeholder 2018-02-16 17:36:45 -05:00
Mike Bayer 0dab4cbf3a - 1.1.16 2018-02-16 16:55:40 -05:00
Mike Bayer 055821630b fix formatting
Change-Id: Ie4687c970508cf8bf183e342db6b89a8aca9d6f9
2018-02-16 16:54:43 -05:00
André Cruz 683e5a2dd4 Add ssl "operation timed out" message for psycopg2
Added "SSL SYSCALL error: Operation timed out" to the list
of messages that trigger a "disconnect" scenario for the
psycopg2 driver.  Pull request courtesy André Cruz.

Change-Id: Ie1a8fc97e74b6906ccacf53dad70fed973c42b7f
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/3
(cherry picked from commit 2f03ec08b5)
2018-02-15 12:48:43 -05:00
Tim Shaffer 54854d290c Fixed link to Flask-SQLAlchemy in documentation
(cherry picked from commit 9feb900f3e)
2018-02-14 11:00:34 -05:00
Mike Bayer f1125b79cc Add dependency for parent_pre post updates to parent deletes
Fixed issue in post_update feature where an UPDATE is emitted
when the parent object has been deleted but the dependent object
is not.   This issue has existed for a long time however
since 1.2 now asserts rows matched for post_update, this
was raising an error.

Change-Id: I31b1d22408e358962577435f0c4cb9a456ba0872
Fixes: #4187
(cherry picked from commit 8607ae51fc)
2018-02-12 17:06:03 -05:00
Mike Bayer cc6cef5184 Search through mapper superclass hierarchy for owner
Fixed regression caused by fix for issue 🎫`4116` affecting versions
1.2.2 as well as 1.1.15, which had the effect of mis-calculation of the
"owning class" of an :class:`.AssociationProxy` as the ``NoneType`` class
in some declarative mixin/inheritance situations as well as if the
association proxy were accessed off of an un-mapped class.  The "figure out
the owner" logic has been replaced by an in-depth routine that searches
through the complete mapper hierarchy assigned to the class or subclass to
determine the correct (we hope) match; will not assign the owner if no
match is found.  An exception is now raised if the proxy is used
against an un-mapped instance.

Change-Id: I611b590df2babe077ce6c19bea89e84251d1a7f4
Fixes: #4185
(cherry picked from commit 650b9eddae)
2018-02-09 16:31:24 -05:00
Mike Bayer 6c6f865541 Ensure weakref finalize_fairy operates upon the current connection
Fixed a fairly serious connection pool bug where a connection that is
acquired after being refreshed as a result of a user-defined
:class:`.DisconnectionError` or due to the 1.2-released "pre_ping" feature
would not be correctly reset if the connection were returned to the pool by
weakref cleanup (e.g. the front-facing object is garbage collected); the
weakref would still refer to the previously invalidated DBAPI connection
which would have the reset operation erroneously called upon it instead.
This would lead to stack traces in the logs and a connection being checked
into the pool without being reset, which can cause locking issues.

Change-Id: Iabd9f3a63a1d0207d0de0054a6ced3560818cf9c
Fixes: #4184
(cherry picked from commit ab1f524c355c0bbac68485a60cb99e7a9d0f944a)
2018-02-08 14:56:19 -05:00
Mike Bayer d0ec6d0dc4 - don't scare off developers with the word "advanced" here
Change-Id: I72a0295634e228bacf6c92088e650183f91e4585
(cherry picked from commit 399988aaed)
2018-01-31 09:27:59 -05:00
Mike Bayer 80e1e8b4a5 Add note to FAQ that IN behavior is modernized in 1.2.
Change-Id: Ibe05d8aaa8da90b52cd07f3bce89dcbd49b841c9
2018-01-25 16:14:54 -05:00
Mike Bayer 6ae587b59f 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.

Change-Id: Ia7f1ab43990450bd96757848b77a35e8fedeab63
References: #4174
(cherry picked from commit 1d435b9f49)
2018-01-25 16:13:56 -05:00
Mike Bayer dde5274fb1 - add missing 2018 update to conf.py
Change-Id: Ie2d4ff9486375867ed6958b82cd2595bae43746d
(cherry picked from commit c3fe4b585b)
2018-01-15 09:21:07 -05:00