| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add SelectBase.exists() method as it seems strange this is
not available already. The Exists construct itself does
not provide full SELECT-building capabilities so it makes
sense this should be used more like a scalar_subquery.
Make sure stream_results is getting set up when yield_per
is used, for 2.0 style statements as well. this was
hardcoded inside of Query.yield_per() and is now moved
to take place within QueryContext.
Change-Id: Icafcd4fd9b708772343d56edf40995c9e8f835d6
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The operator changes are:
* `isfalse` is now `is_false`
* `isnot_distinct_from` is now `is_not_distinct_from`
* `istrue` is now `is_true`
* `notbetween` is now `not_between`
* `notcontains` is now `not_contains`
* `notendswith` is now `not_endswith`
* `notilike` is now `not_ilike`
* `notlike` is now `not_like`
* `notmatch` is now `not_match`
* `notstartswith` is now `not_startswith`
* `nullsfirst` is now `nulls_first`
* `nullslast` is now `nulls_last`
Because these are core operators, the internal migration strategy for this
change is to support legacy terms for an extended period of time -- if not
indefinitely -- but update all documentation, tutorials, and internal usage
to the new terms. The new terms are used to define the functions, and
the legacy terms have been deprecated into aliases of the new terms.
Fixes: #5435
Change-Id: Ifbd7cb1cdda5981990243c4fc4b4ff467dc132ac
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This term confuses this feature with the lesser used
"bulk insert/update" feature, and also "bulk" is not as
descriptive here as only a single statement is run; there's
not a large set of data passed in.
For now call it UPDATE/DELETE with arbitrary WHERE clause,
or ORM-enabled UPDATE/DELETE.
Change-Id: I317fcda9d73d4c2dd250031a745dd3d72e4f1fc6
|
| | |
| |
| |
| |
| | |
Fixes: #5678
Change-Id: I186b26d1265c106bb87fb9e680229cad1eb8d7ea
|
| |/
|
|
|
|
|
|
|
|
|
| |
In c7b489b25802f7a25ef78d0731411295c611cc1c we implemented
with_loader_criteria() for everyone as well as PropComparator.and_()
for joinedload() and join(), but forgot to do anything for
lazyload(), selectinload(), or subqueryload(). Even though
I actually documented it in terms of lazyload().
Fixes: #4472
Change-Id: I0ef410a83c34e63b9c9c9c3277c0063d8971ec14
|
| |
|
|
|
|
|
|
|
| |
Fixes: #5243
Closes: #5328
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5328
Pull-request-sha: e760ed4ef1749aadfb8d63d776c764d98b93b1e5
Change-Id: I8e7bc3429dc279d447cc66400c76b4d2a04626aa
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes: #5661
### Description
Fixes reflection of composite primary keys to maintain the correct column order in the MSSQL
and SQLite dialects.
Closes: #5662
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5662
Pull-request-sha: b568dec7070b4f3ee46a528bdf16fb237baade2a
Change-Id: I452b23cbf7f389c4a0a34cffce5c32498efe37d2
|
| |/
|
|
|
|
|
| |
the text here was a little confusing and didn't refer to major
configurational elements such as hide_parameters.
Change-Id: I4e2179e5a64c326d30b65a8871b924725c41b453
|
| |
|
|
|
|
|
|
| |
part 2 of e3dc20ff27fa75e571fb2631e64737ea8f25f7c5, the
pre-evaluate step was also emitting SELECT for expired objects.
Fixes: #5664
Change-Id: I9f5de2a5d480eafeb290ec0c45ce2a82ec93475b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed bug in :meth:`_orm.Query.update` where objects in the
:class:`_orm.Session` that were already expired would be unnecessarily
SELECTed individually when they were refreshed by the "evaluate"
synchronize strategy.
For 1.4 there was also a similar issue with fetch that would actually
get the wrong data back, as the new value would be loaded, then
applied with the evaluator.
Fixes: #5664
Change-Id: I6e6aff88462654fcefa9fce2b45f5446c418deee
|
| |
|
|
|
| |
Fixes: #5647
Change-Id: I98979577f5354eba993ade9fc5056db718f47a18
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to invalidate a connection within a Transaction
block and an execution context, we need to take advantage
of the simpler transaction design added in 1.4. The recipe
can be done on 1.3 but it requires a lot more hacking
and isn't worth it.
Clearly since the recipe is part of the tests now we can
in the future consider adding a feature that's built
in for this case but it would have to absolutely guarantee
the DBAPI is in autocommit mode and also prevent
any "write" operations from taking place. Recipe for now.
Fixes: #5657
Change-Id: Ia9ea8cced084d154e83e4d1c259e080b776ec38a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed structural compiler issue where some constructs such as MySQL /
PostgreSQL "on conflict / on duplicate key" would rely upon the state of
the :class:`_sql.Compiler` object being fixed against their statement as
the top level statement, which would fail in cases where those statements
are branched from a different context, such as a DDL construct linked to a
SQL statement.
Fixes: #5656
Change-Id: I568bf40adc7edcf72ea6c7fd6eb9d07790de189e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improved support for column names that contain percent signs in the string,
including repaired issues involving anoymous labels that also embedded a
column name with a percent sign in it, as well as re-established support
for bound parameter names with percent signs embedded on the psycopg2
dialect, using a late-escaping process similar to that used by the
cx_Oracle dialect.
* Added new constructor for _anonymous_label() that ensures incoming
string tokens based on column or table names will have percent
signs escaped; abstracts away the format of the label.
* generalized cx_Oracle's quoted_bind_names facility into the compiler
itself, and leveraged this for the psycopg2 dialect's issue with
percent signs in names as well. the parameter substitution is now
integrated with compiler.construct_parameters() as well as the
recently reworked set_input_sizes(), reducing verbosity in the
cx_Oracle dialect.
Fixes: #5653
Change-Id: Ia2ad13ea68b4b0558d410026e5a33f5cb3fbab2c
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These attributes will be removed in SQLAlchemy 2.0.
Also alters the deprecation message to qualify the
type of object correctly. this in turn requires changes
in the warnings filter and deprecation tests.
Change-Id: I5779d9813e88f42e5db0c7b5e3ffff1d1535c203
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Reworked the "setinputsizes()" set of dialect hooks to be correctly
extensible for any arbirary DBAPI, by allowing dialects individual hooks
that may invoke cursor.setinputsizes() in the appropriate style for that
DBAPI. In particular this is intended to support pyodbc's style of usage
which is fundamentally different from that of cx_Oracle. Added support
for pyodbc.
Fixes: #5649
Change-Id: I9f1794f8368bf3663a286932cfe3992dae244a10
|
| |
|
|
|
|
| |
in prep for a new feature as part of #5648.
Change-Id: I6720b0ea797c188de5e8163f79fb7b7994d6e76e
|
| |
|
|
| |
Change-Id: I472049fbdda70da94bbf1cf7b5e10d04721bc771
|
| |\
| |
| |
| | |
Change-Id: I785a3c8a49f2d75279ade65bd86915de1178a3ff
|
| | |
| |
| | |
PR link: https://github.com/sqlalchemy/sqlalchemy/pull/5636
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
I'm not 100% sure what this sentence is saying, but I'm pretty sure it needs either commas or parentheses to break it up a little. I think parens make the most sense in this case assuming I am reading it correctly. Here's the original sentence and proposed edit in plaintext:
ORIG
"...persistent objects which were removed from a collection or in some cases a scalar attribute may also be pulled into the Session of a parent object;..."
EDIT
"...persistent objects which were removed from a collection (or in some cases a scalar attribute) may also be pulled into the Session of a parent object;..."
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | | |
Fixes: #5646
Change-Id: I25fcba7cf866871f1232b586e7e604162bd8cc43
|
| |/ /
| |
| |
| | |
Change-Id: I0259bed2ee06e741889e8b9bed6bf6ad106fa425
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Using strings to represent relationship names in ORM operations such as
:meth:`_orm.Query.join`, as well as strings for all ORM attribute names
in loader options like :func:`_orm.selectinload`
is deprecated and will be removed in SQLAlchemy 2.0. The class-bound
attribute should be passed instead. This provides much better specificity
to the given method, allows for modifiers such as ``of_type()``, and
reduces internal complexity.
Additionally, the ``aliased`` and ``from_joinpoint`` parameters to
:meth:`_orm.Query.join` are also deprecated. The :func:`_orm.aliased`
construct now provides for a great deal of flexibility and capability
and should be used directly.
Fixes: #4705
Fixes: #5202
Change-Id: I32f61663d68026154906932913c288f269991adc
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Change-Id: I0a753a2b48ed932c3209b93df0a96efe90af17c5
|
| | | |
| | |
| | |
| | | |
Change-Id: Ic053a30e9f0e6c99b638a0629e1192336bff3f76
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A user noticed that creating an index where the "key part" was an expression
or function would raise an error for MySQL because the key part was not
parenthesized. The proposed change will check whether a key part is not a
Column or Unary Expression and parenthesize if the case is False.
This fix also contains a minor fix to a test case that was previously incorrect
(`def test_create_index_expr():`).
**Have a nice day!**
Fixes: #5462
Closes: #5587
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5587
Pull-request-sha: 7515e50cd7435744fc79c210b2f3aa4c0546ba28
Change-Id: Id1b3b3026983c0e05808baa243e354f82b78180c
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The :paramref:`_schema.MetaData.bind` argument as well as the overall
concept of "bound metadata" is deprecated in SQLAlchemy 1.4 and will be
removed in SQLAlchemy 2.0. The parameter as well as related functions now
emit a :class:`_exc.RemovedIn20Warning` when :ref:`deprecation_20_mode` is
in use.
Added new parameter :paramref:`_automap.AutomapBase.prepare.autoload_with`
which supersedes :paramref:`_automap.AutomapBase.prepare.reflect`
and :paramref:`_automap.AutomapBase.prepare.engine`.
Fixes: #4634
Fixes: #5142
Change-Id: Iaabf9b481931e2fb68b97b5954c32e65772a298e
|
| | |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The :class:`_schema.Table` class now raises a deprecation warning
when columns with the same name are defined. To replace a column a new
parameter :paramref:`_schema.Table.append_column.replace_existing` was
added to the :meth:`_schema.Table.append_column` method.
The :meth:`_expression.ColumnCollection.contains_column` will now
raises an error when called with a string, suggesting the caller
to use ``in`` instead.
Co-authored-by: Federico Caselli <cfederico87@gmail.com>
Change-Id: I1d58c8ebe081079cb669e7ead60886ffc1b1a7f5
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed issue where a plain pickle dumps call of the :class:`_sql.Over`
construct didn't work.
Fixes: #5644
Change-Id: I4b07f74ecd5d52f0794128585367012200a38a36
|
| |/ /
| |
| |
| |
| | |
Fixes: #5642
Change-Id: I07a77483e6e2ec593d87d3d3467a4339c5f77a26
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Due to https://github.com/tlocke/pg8000/commit/3a2e7439ae3613367ec231218d7e0f541466d1e5
we no longer decode the description. pin to 1.16.6 as minimum version
so that we don't need to track version changes in code.
Change-Id: I192c851eb2337f37467560a3cbb87f7235884788
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | | |
Fixes: #5634
Change-Id: Ie8d4076ee35234b535a04e6fb9321096df3f648b
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Reworked the proxy creation used by scoped_session() to be
based on fully copied code with augmented docstrings and
moved it into langhelpers. asyncio session, engine,
connection can now take
advantage of it so that all non-async methods are availble.
Overall implementation of most important accessors / methods
on AsyncConnection, etc. , including awaitable versions
of invalidate, execution_options, etc.
In order to support an event dispatcher on the async
classes while still allowing them to hold __slots__,
make some adjustments to the event system to allow
that to be present, at least rudimentally.
Fixes: #5628
Change-Id: I5eb6929fc1e4fdac99e4b767dcfd49672d56e2b2
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | | |
Change-Id: I3b80b836ca547fa92f324acb265180cdeea17611
|
| |/ /
| |
| |
| |
| |
| |
| | |
py2k coverage tests were failing because of this API
usage that seems to pass on Py3k but not py2k
Change-Id: Ic7ceb03c2660f411f487fce73ce5c2fa2c752031
|
| | |
| |
| |
| |
| |
| |
| | |
we need 4.6 to support Python 2. however 4.6.0 is too low,
4.6.11 seems to work in both python 2 and 3, pin on that
Change-Id: I0a5995ca5e5bf08a06997130e4ffbaaceef8d942
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
pytest 6.x support was fixed in 40cdb9c for 1.3 and in ffafbd4
for master. Add a note as this is an observable issue
in 1.3.19.
Fixes: #5635
Change-Id: Iee67822d6962800646546c69ee0ad0c494007c86
|