Commit Graph

10312 Commits

Author SHA1 Message Date
Mike Bayer 24dba714cb - update oracle JDBC driver URL, fixes #3554 2016-01-20 15:58:24 -05:00
Mike Bayer a53bd6f74b - cross link for concrete helper classes
- remove redundant concrete helper docs from declarative docs,
two places is enough
2016-01-20 15:28:35 -05:00
Mike Bayer baabf3bedb - typo
(cherry picked from commit b53667526e)
2016-01-20 14:03:49 -05:00
Mike Bayer 632c4f21fa - redo the docs for concrete inheritance to more strongly
favor declarative, fixes #2890
2016-01-20 13:34:57 -05:00
Mike Bayer 02271efd89 - clarify the "Adding" section also illustrates updates, fixes #2942 2016-01-20 12:22:17 -05:00
Mike Bayer 165fa15b0f - add a note that the literal_binds flag should be used
when cross-compiling from DDL to SQL, fixes #3615
2016-01-20 12:10:40 -05:00
Chase a2badb751f Fix ArrayOfEnum's handling of empty arrays.
Prior to this change a value of `'{}'` would split into the list `['']`.
2016-01-19 22:36:15 -08:00
Mike Bayer 5a279e7ae4 - the order in which _generate_backref() for different mappers is called
is random; therefore it may be called against the subclass mapper first, so
need to check .concrete on both sides, references #3630
2016-01-19 17:08:50 -05:00
Mike Bayer 39837686b0 - calling str() on a core sql construct has been made more "friendly",
when the construct contains non-standard sql elements such as
returning, array index operations, or dialect-specific or custom
datatypes.  a string is now returned in these cases rendering an
approximation of the construct (typically the postgresql-style
version of it) rather than raising an error. fixes #3631
- add within_group to top-level imports
- add eq_ignore_whitespace to sqlalchemy.testing imports
2016-01-19 16:47:16 -05:00
Mike Bayer b7bc704f3d - Fixed issue where two same-named relationships that refer to
a base class and a concrete-inherited subclass would raise an error
if those relationships were set up using "backref", while setting up the
identical configuration using relationship() instead with the conflicting
names would succeed, as is allowed in the case of a concrete mapping.
fixes #3630
2016-01-19 13:34:42 -05:00
Mike Bayer 2a7f37b7b0 - The `str() call for :class:.Query` will now take into account
the :class:`.Engine` to which the :class:`.Session` is bound, when
generating the string form of the SQL, so that the actual SQL
that would be emitted to the database is shown, if possible.  Previously,
only the engine associated with the :class:`.MetaData` to which the
mappings are associated would be used, if present.  If
no bind can be located either on the :class:`.Session` or on
the :class:`.MetaData` to which the mappings are associated, then
the "default" dialect is used to render the SQL, as was the case
previously.  fixes #3081
2016-01-19 12:44:42 -05:00
Mike Bayer d4d9a65248 - Fixed bug where some exception re-raise scenarios would attach
the exception to itself as the "cause"; while the Python 3 interpreter
is OK with this, it could cause endless loops in iPython.
fixes #3625
- add tests for reraise, raise_from_cause
- raise_from_cause is the same on py2k/3k, use just one function
2016-01-18 17:35:44 -05:00
Mike Bayer b985483c59 Merge remote-tracking branch 'origin/pr/227' 2016-01-16 22:06:29 -05:00
Mike Bayer 66560cef74 - fix People -> Person , fixes #3628 2016-01-16 22:04:10 -05:00
rmn f9b2185586 Fix typo in relationships docs 2016-01-16 21:19:02 +03:00
Mike Bayer a7cc296714 - update 2016-01-14 18:21:23 -05:00
Mike Bayer 7bb578b1bd - illustrate these using the newer exception doctest format.
unfortunately we can't show the SQL unless we filtered it out
from doctest...not worth it
2016-01-14 18:20:00 -05:00
Mike Bayer 1f7a1f777d - A deep improvement to the recently added :meth:.TextClause.columns
method, and its interaction with result-row processing, now allows
the columns passed to the method to be positionally matched with the
result columns in the statement, rather than matching on name alone.
The advantage to this includes that when linking a textual SQL statement
to an ORM or Core table model, no system of labeling or de-duping of
common column names needs to occur, which also means there's no need
to worry about how label names match to ORM columns and so-forth.  In
addition, the :class:`.ResultProxy` has been further enhanced to
map column and string keys to a row with greater precision in some
cases.  fixes #3501
- reorganize the initialization of ResultMetaData for readability
and complexity; use the name "cursor_description", define the
task of "merging" cursor_description with compiled column information
as its own function, and also define "name extraction" as a separate task.
- fully change the name we use in the "ambiguous column" error to be the
actual name that was ambiguous, modify the C ext also
2016-01-14 18:06:26 -05:00
Mike Bayer 0ff3f95d5b - there was a DATEPART test after all, fix format 2016-01-14 17:50:03 -05:00
Mike Bayer d5d7284bdd - fix some old verbiage that refers to text() as an "implicit" thing
for SQL fragments; we've deprecated that in 1.0 and its a good idea
to document like this for 0.9 as well.
2016-01-14 17:18:21 -05:00
Mike Bayer f2b00f1048 - convert keys to str for None not sortable against str on py3k 2016-01-12 10:49:14 -05:00
Mike Bayer 215167d8d3 - changelog for pr bitbucket:70, fixes #3624 2016-01-12 09:53:09 -05:00
Guillaume DOUMENC c4f415d979 Remove quote on first DATEPART paramater 2016-01-12 04:46:32 +00:00
Mike Bayer 6fbfadc738 - reorganize schema_translate_map to be succinct and gain the performance
back by using an attrgetter for the default case
2016-01-11 16:44:28 -05:00
Mike Bayer b301f009e1 - refactor a bit the loader options system to make it a bit more
intelligible, given the fixes for ref #3623.  unfortunately the system
is still quite weird even though it was rewritten to be... less weird
2016-01-10 17:47:38 -05:00
Mike Bayer d03477d4b7 - fix link to types in metadata, fixes #3618
- fix "version" got whacked into "f" in core tutorial
- fix short underline in automap
- fix unmatched boldface in session events
2016-01-10 11:48:53 -05:00
Mike Bayer ddba8b0e7f Merge remote-tracking branch 'origin/pr/225' 2016-01-10 10:31:51 -05:00
Mike Bayer 536e5cecea Merge remote-tracking branch 'origin/pr/226' 2016-01-09 22:27:12 -05:00
Mike Bayer 331caf11d3 - ensure we use a Connection for effective schema here since Engine doesn't
have it; keep it simple
2016-01-09 22:25:56 -05:00
Adrian Moennich bb29449755 Fix typo in session docs 2016-01-09 20:35:19 +01:00
Mike Bayer c7ae0daf0e - Fixed regression since 0.9 where the 0.9 style loader options
system failed to accommodate for multiple :func:`.undefer_group`
loader options in a single query.   Multiple :func:`.undefer_group`
options will now be taken into account even against the same
entity. fixes #3623
2016-01-09 10:10:20 -05:00
Mike Bayer 89facbed88 - Multi-tenancy schema translation for :class:.Table objects is added.
This supports the use case of an application that uses the same set of
:class:`.Table` objects in many schemas, such as schema-per-user.
A new execution option
:paramref:`.Connection.execution_options.schema_translate_map` is
added. fixes #2685
- latest tox doesn't like the {posargs} in the profile rerunner
2016-01-08 22:12:25 -05:00
Mike Bayer 777e25694f - fix docstrings 2016-01-08 16:27:37 -05:00
Mike Bayer 1539268cf7 Merged in jvanasco/sqlalchemy-alt/issue_docs_scoped_session (pull request #50)
updated docstrings for orm.scoping
2016-01-07 12:50:09 -05:00
Mike Bayer ff803b1a2a - pg8000 fixes for json 2016-01-07 11:04:58 -05:00
Mike Bayer cd8adfe418 - add a do-nothing for mock url _instantiate_plugins 2016-01-06 20:10:28 -05:00
Mike Bayer 5c8bdcab90 - add limiting criteria to the JSON tests so that we don't
attempt integer indexed access from a key/value object nor
string access from an integer-indexed array, as earlier Postgresql
versions (prior to 9.4) don't allow this
2016-01-06 17:27:30 -05:00
Mike Bayer c8b7729338 - Added a new entrypoint system to the engine to allow "plugins" to
be stated in the query string for a URL.   Custom plugins can
be written which will be given the chance up front to alter and/or
consume the engine's URL and keyword arguments, and then at engine
create time will be given the engine itself to allow additional
modifications or event registration.  Plugins are written as a
subclass of :class:`.CreateEnginePlugin`; see that class for
details.
fixes #3536
2016-01-06 17:20:57 -05:00
Mike Bayer cfb631e089 - long line 2016-01-06 13:21:14 -05:00
Mike Bayer 93d71b80f2 - add a few JSON tests specific to MySQL, including basic reflection 2016-01-06 13:18:04 -05:00
Mike Bayer a80bb4e5aa - Added :class:.mysql.JSON for MySQL 5.7. The JSON type provides
persistence of JSON values in MySQL as well as basic operator support
of "getitem" and "getpath", making use of the ``JSON_EXTRACT``
function in order to refer to individual paths in a JSON structure.
fixes #3547
- Added a new type to core :class:`.types.JSON`.  This is the
base of the PostgreSQL :class:`.postgresql.JSON` type as well as that
of the new :class:`.mysql.JSON` type, so that a PG/MySQL-agnostic
JSON column may be used.  The type features basic index and path
searching support.
fixes #3619
- reorganization of migration docs etc. to try to refer both to
the fixes to JSON that helps Postgresql while at the same time
indicating these are new features of the new base JSON type.
- a rework of the Array/Indexable system some more, moving things
that are specific to Array out of Indexable.
- new operators for JSON indexing added to core so that these can
be compiled by the PG and MySQL dialects individually
- rename sqltypes.Array to sqltypes.ARRAY - as there is no generic
Array implementation, this is an uppercase type for now, consistent
with the new sqltypes.JSON type that is also not a generic implementation.
There may need to be some convention change to handle the case of
datatypes that aren't generic, rely upon DB-native implementations,
but aren't necessarily all named the same thing.
2016-01-06 12:47:48 -05:00
Mike Bayer 16746dd1a6 - dont forwards-report tons of 1.0.x changes in the unreleased 1.1;
only when a 1.1.x is released would we want to capture what's still
sitting in a 1.0.x changelog
2016-01-05 15:12:56 -05:00
Mike Bayer 197ffa2be2 - Fixed 1.0 regression where the eager fetch of cursor.rowcount was
no longer called for an UPDATE or DELETE statement emitted via plain
text or via the :func:`.text` construct, affecting those drivers
that erase cursor.rowcount once the cursor is closed such as SQL
Server ODBC and Firebird drivers.
fixes #3622
2016-01-05 10:25:36 -05:00
Mike Bayer 04b1a52783 - break out mysql/base into modules as it's getting huge with more to come 2016-01-04 17:37:23 -05:00
Jeff Widman 56b76ce7a8 Update SQLAlchemy-Migrate link to the new repo 2015-12-24 02:17:02 -08:00
Mike Bayer c7d6c667b5 - Fixed an assertion that would raise somewhat inappropriately
if a :class:`.Index` were associated with a :class:`.Column` that
is associated with a lower-case-t :class:`.TableClause`; the
association should be ignored for the purposes of associating
the index with a :class:`.Table`.
fixes #3616
2015-12-23 22:59:44 -05:00
Mike Bayer 93b48e6aba - release date for 1.0.11 2015-12-22 20:50:38 -05:00
Mike Bayer 8c54b14b5c - An adjustment to the regular expression used to parse MySQL views,
such that we no longer assume the "ALGORITHM" keyword is present in
the reflected view source, as some users have reported this not being
present in some Amazon RDS environments.
fixes #3613
2015-12-22 12:04:45 -05:00
Mike Bayer 5c7ade2f42 - changelog for pullreq github:222 2015-12-22 11:56:02 -05:00
Mike Bayer e95c34481c Merge remote-tracking branch 'origin/pr/222' 2015-12-22 11:54:19 -05:00