| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
e.g. select([x* 5]) produces "SELECT x * 5 AS anon_1".
This allows the labelname to be present in the cursor.description
which can then be appropriately matched to result-column processing
rules. (we can't reliably use positional tracking for result-column
matches since text() expressions may represent multiple columns).
- operator overloading is now controlled by TypeEngine objects - the
one built-in operator overload so far is String types overloading
'+' to be the string concatenation operator.
User-defined types can also define their own operator overloading
by overriding the adapt_operator(self, op) method.
- untyped bind parameters on the right side of a binary expression
will be assigned the type of the left side of the operation, to better
enable the appropriate bind parameter processing to take effect
[ticket:819]
|
|
|
|
|
|
|
|
| |
once and is
then re-used. the FROM calculation of a Select normalizes the list of hide_froms against all
previous incarnations of each FROM clause, using a tag attached from cloned clause to
previous.
|
|
|
|
|
|
| |
when its an alias of a Table; added some test coverage for one particular
case from the doctests
- fixed "having" example in doctests, updated eager load example
|
|
|
|
|
|
| |
- bindparam 'shortname' is deprecated
- fixed testing.assert_compile() to actually generate bind param dict before asserting
- added bind param assertions to CRUDTest.test_update
|
|
|
|
| |
Connectable.execute_clauseelement
|
|
|
|
|
|
|
|
| |
fixes platform-affected bugs in missing the correct "oid" column
- locate_all_froms() is expensive; added an attribute-level cache for it
- put a huge warning on all select.append_XXX() methods stating that derived collections like locate_all_froms() may become invalid if
already initialized
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CompoundSelects
may extend from more than one root column.
- keys_ok argument from corresponding_column() removed. no more name-based matching of columns anywhere.
- DictDecorator is gone. all row translators provided by orm.util.create_row_adapter(). Mapper
and contains_alias() cache the adapters on target mapper to avoid re-computation of adapters.
- create_row_adapter() accepts an "equivalent_columns" map as produced by Mapper, so that
row adapters can take join conditions into account (as usual again, to help with the CompoundSelects
produced by polymorphic_union).
- simplified TableSingleton to just provide lookup; moved all initialization into Table.
- the "properties" accessor on Mapper is removed; it now throws an informative
exception explaining the usage of mapper.get_property() and
mapper.iterate_properties
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
selectable expressions. On the SQL side this is represented by the
"corresponding_column()" method. This method is used heavily by the ORM
to "adapt" elements of an expression to similar, aliased expressions,
as well as to target result set columns originally bound to a
table or selectable to an aliased, "corresponding" expression. The new
rewrite features completely consistent and accurate behavior.
- the "orig_set" and "distance" elements as well as all associated
fanfare are gone (hooray !)
- columns now have an optional "proxies" list which is a list of all
columns they are a "proxy" for; only CompoundSelect cols proxy more than one column
(just like before). set operations are used to determine lineage.
- CompoundSelects (i.e. unions) only create one public-facing proxy column per
column name. primary key collections come out with just one column per embedded
PK column.
- made the alias used by eager load limited subquery anonymous.
|
| |
|
|
|
|
|
|
|
|
| |
much simpler
and "correct" version which will copy all elements exactly once, except for those which were
replaced with target elements. It also can match a wider variety of target elements including
joins and selects on identity alone.
|
|
|
|
|
|
|
| |
its needless
and led to some very strange anonymous label names
- removed what was apparently cruft in some column-targeting code
|
|
|
|
| |
ORM scenarios where literal text is used for SQL expressions
|
|
|
|
| |
- Added test coverage for endswith operator
|
| |
|
| |
|
|
|
|
| |
8.2+. [ticket:797]
|
|
|
|
|
| |
- Selectable is only used as a marker for FromClause (probably should be
removed/both classes merged)
|
|
|
|
|
|
|
| |
- added SessionExtension docs.
- removed old sqlconstruction doc.
- changed 'copy_collections' flag in Select to '_copy_collections'; its
not really "public".
|
|
|
|
|
| |
- fixed tutorial doctests to adjust for execution changes, session being weak-referencing
(reloads objects more frequently which get u'' applied to their __repr__())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dictionary of QueryContext is now passed to SelectionContext inside
of Query.instances(), allowing messages to be passed between the two stages.
- removed the recent "exact match" behavior of Alias objects, they're back to
their usual behavior.
- tightened up the relationship between the Query's generation
of "eager load" aliases, and Query.instances() which actually grabs the
eagerly loaded rows. If the aliases were not specifically generated for
that statement by EagerLoader, the EagerLoader will not take effect
when the rows are fetched. This prevents columns from being grabbed accidentally
as being part of an eager load when they were not meant for such, which can happen
with textual SQL as well as some inheritance situations. It's particularly important
since the "anonymous aliasing" of columns uses simple integer counts now to generate
labels.
|
|
|
|
|
|
|
|
|
| |
to TEXT/CLOB when no length is present now occurs *only* for an exact type
of String or Unicode with no arguments. If you use VARCHAR or NCHAR
(subclasses of String/Unicode) with no length, they will be interpreted
by the dialect as VARCHAR/NCHAR; no "magic" conversion happens there.
This is less surprising behavior and in particular this helps Oracle keep
string-based bind parameters as VARCHARs and not CLOBs [ticket:793].
|
|
|
|
|
|
|
|
| |
match exactly
to the label used in the generated statement. This is so searching for columns in a
result row which match aliases won't accidentally match non-aliased columns.
fixes errors which can arise in eager loading scenarios.
|
|
|
|
|
|
| |
~(x <operator> y) produces NOT (x <op> y), which is better compatible with MySQL.
[ticket:764]. this doesn't apply to "~(x==y)" as it does in 0.3 since ~(x==y)
compiles to "x != y", but still applies to operators like BETWEEN.
|
| |
|
|
|
|
|
|
| |
- reduced complexity of parameter handling during execution; __distill_params does all
parameter munging, executioncontext.parameters always holds a list of parameter structures
(lists, tuples, or dicts).
|
|
|
|
|
|
|
|
| |
"column_keys". the parameters sent to execute() only interact with the
insert/update statement compilation process in terms of the column names
present but not the values for those columns.
produces more consistent execute/executemany behavior, simplifies things a
bit internally.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- all executemany() style calls put all sequences and SQL defaults inline into a single SQL statement
and don't do any pre-execution
- regular Insert and Update objects can have inline=True, forcing all executions to be inlined.
- no last_inserted_ids(), lastrow_has_defaults() available with inline execution
- calculation of pre/post execute pushed into compiler; DefaultExecutionContext greatly simplified
- fixed postgres reflection of primary key columns with no sequence/default generator, sets autoincrement=False
- fixed postgres executemany() behavior regarding sequences present, not present, passivedefaults, etc.
- all tests pass for sqlite, mysql, postgres; oracle tests pass as well as they did previously including all
insert/update/default functionality
|
|
|
|
| |
- fixed up PG distinct flag
|
| |
|
| |
|
|
|
|
| |
more pedantic DBAPI -> DB-API changes in docstrings
|
|
2. compiler names changed to be less verbose, unused classes removed.
3. Methods on Dialect which return compilers, schema generators, identifier preparers
have changed to direct class references, typically on the Dialect class itself
or optionally as attributes on an individual Dialect instance if conditional behavior is needed.
This takes away the need for Dialect subclasses to know how to instantiate these
objects, and also reduces method overhead by one call for each one.
4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument.
5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
|