| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
| |
- improved pool docs
- typos etc.
- ClauseElement.execute() and scalar() make no sense - these are depreacted.
The official home is Executable.
- alias() is not executable, allowing it is sloppy so this goes under
the deprecated umbrella
|
| |
|
|
|
|
|
|
|
| |
remote_side, order_by - all column-based
expressions are enforced - lists of strings
are explicitly disallowed since this is a
very common error
|
|
|
|
| |
- fix typo in test
|
|
|
|
| |
uphill climb
|
|
|
|
|
|
|
|
|
|
|
| |
whenever you say somecol.label(), now counts itself
in its "proxy_set" unioned with that of it's
contained column's proxy set, instead of
directly returning that of the contained column.
This allows column correspondence
operations which depend on the identity of the
_Labels themselves to return the correct result
- fixes ORM bug [ticket:1852].
|
|
|
|
|
|
|
|
| |
oriented situation, will at least return NULLTYPE
for its type instead of None, allowing it to
be used a little more freely for ad-hoc column
expressions than before. literal_column()
is still the better choice, however.
|
|
|
|
|
|
|
|
| |
for column_mapped_collection, including string,
text() etc., will raise an error message that
specifically asks for a column element, no longer
misleads with incorrect information about
text() or literal(). [ticket:1863]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mapper property attribute, it will be called to get the
actual attribute value during initialization. Currently,
there's no advantage to using @classproperty on a column
or relationship attribute of a declarative class that
isn't a mixin - evaluation is at the same time as if
@classproperty weren't used. But here we at least allow
it to function as expected.
- docs for column_property() with declarative
- mixin docs in declarative made more clear - mixins
are optional - each subsection starts with, "in *declarative mixins*",
to reduce confusion
|
| |
|
|
|
|
| |
classes (e.g. fixes func.text()). [ticket:1798]
|
|
|
|
|
|
|
| |
self.__class__ to determine the class of object to be returned
instead of hardcoding to ColumnClause/Column, making it slightly
easier to produce specific subclasses of these which work in
alias/subquery situations.
|
|
|
|
|
|
| |
Grouping parenthesis are added automatically, i.e. usage
is like `col.in_(text("select id from table"))`.
[ticket:1793]
|
| |
|
|
|
|
|
|
|
| |
- with m2m we have to go back to the previous approach of having both sides of
the DP fire off, tracking each pair of objects. history may not be consistently present
in one side or the other
- this revealed a whole lot of issues with self-referential m2m, which are fixed
|
|
|
|
|
| |
deprecated, and will eventually be rolled into a more
comprehensive version of the feature for [ticket:1729].
|
|
|
|
|
|
|
|
|
|
| |
where Compiled objects will be cached when the Connection
compiles a clause expression into a dialect- and parameter-
specific Compiled object. It is the user's responsibility to
manage the size of this dictionary, which will have keys
corresponding to the dialect, clause element, the column
names within the VALUES or SET clause of an INSERT or UPDATE,
as well as the "batch" mode for an INSERT or UPDATE statement.
|
|
|
|
|
|
|
|
| |
that tables with column names that overlap another column
of the form "<tablename>_<columnname>" won't produce
errors if column._label is used as a bind name during
an UPDATE. Test coverage which wasn't present in 0.5
has been added. [ticket:1755]
|
|
|
|
|
|
|
|
|
|
| |
directly down to select().with_hint() and also accepts
entities as well as tables and aliases. See with_hint() in the
SQL section below. [ticket:921]
- Added with_hint() method to select() construct. Specify
a table/alias, hint text, and optional dialect name, and
"hints" will be rendered in the appropriate place in the
statement. Works for Oracle, Sybase, MySQL. [ticket:921]
|
|
|
|
|
|
|
|
| |
if the left side is a join, it will attempt to join the right
side to the rightmost side of the left first, and not raise
any exceptions about ambiguous join conditions if successful
even if there are further join targets across the rest of
the left. [ticket:1714]
|
|
|
|
|
| |
which is more or less equivalent on that platform.
[ticket:1712]
|
|
|
|
| |
and one 5-space indentation block corrected to 4 spaces).
|
| |
|
| |
|
| |
|
|
|
|
| |
coercion. this system has to be figured out somehow
|
|
|
|
|
|
|
|
| |
account, if it is
compatible with what was found for the right, so that things like oracle CHAR conversions
work.
- oracle dialect specific tests pass again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
API, used for any expression construct that can be sent to
execute(). FunctionElement now inherits Executable so that
it gains execution_options(), which are also propagated
to the select() that's generated within execute().
Executable in turn subclasses _Generative which marks
any ClauseElement that supports the @_generative
decorator - these may also become "public" for the benefit
of the compiler extension at some point.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of determining the return type from an expression
as well as the adaptation of the Python operator into
a SQL operator, based on the full left/right/operator
of the given expression. In particular
the date/time/interval system created for Postgresql
EXTRACT in [ticket:1647] has now been generalized into
the type system. The previous behavior which often
occured of an expression "column + literal" forcing
the type of "literal" to be the same as that of "column"
will now usually not occur - the type of
"literal" is first derived from the Python type of the
literal, assuming standard native Python types + date
types, before falling back to that of the known type
on the other side of the expression. Also part
of [ticket:1683].
|
|
|
|
|
|
|
|
|
|
|
| |
same way any func.foo() construct is, with automatic
SELECT being applied when passed to execute().
- The "type" and "bind" keyword arguments of a func.foo()
construct are now local to "func." constructs and are
not part of the FunctionElement base class, allowing
a "type" to be handled in a custom constructor or
class-level variable.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
as select().autocommit() are deprecated - now call
.execution_options(autocommit=True) on either of those
constructs, also available directly on Connection and orm.Query.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
to be compared to another set, typically with IN against
composite primary keys or similar. Also accepts an
IN with multiple columns. The "scalar select can
have only one column" error message is removed - will
rely upon the database to report problems with
col mismatch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of statements have more consistent behavior w.r.t.
parenthesizing. Each compound element embedded within
another will now be grouped with parenthesis - previously,
the first compound element in the list would not be grouped,
as SQLite doesn't like a statement to start with
parenthesis. However, Postgresql in particular has
precedence rules regarding INTERSECT, and it is
more consistent for parenthesis to be applied equally
to all sub-elements. So now, the workaround for SQLite
is also what the workaround for PG was previously -
when nesting compound elements, the first one usually needs
".alias().select()" called on it to wrap it inside
of a subquery. [ticket:1665]
|
|
|
|
|
|
|
|
|
| |
which accepts keywords that affect how the statement
is executed w.r.t. the DBAPI. Currently supports
"stream_results", causes psycopg2 to use a server
side cursor for that statement. Can also be set
upon select() and text() constructs directly as well
as ORM Query().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
passed to the resulting statement. Currently only
Select-statements have these options, and the only option
used is "stream_results", and the only dialect which knows
"stream_results" is psycopg2.
- Query.yield_per() will set the "stream_results" statement
option automatically.
- Added "statement_options()" to Selects, which set statement
specific options. These enable e.g. dialect specific options
such as whether to enable using server side cursors, etc.
- The psycopg2 now respects the statement option
"stream_results". This option overrides the connection setting
"server_side_cursors". If true, server side cursors will be
used for the statement. If false, they will not be used, even
if "server_side_cursors" is true on the
connection. [ticket:1619]
- added a "frozendict" from http://code.activestate.com/recipes/414283/,
adding more default collections as immutable class vars on
Query, Insert, Select
|
| |
|
|
|
|
|
|
|
|
|
| |
correspondence for cloned selectables which contain
free-standing column expressions. This bug is
generally only noticeable when exercising newer
ORM behavior only availble in 0.6 via [ticket:1568],
but is more correct at the SQL expression level
as well. [ticket:1617]
|
|
|
|
| |
- link all classes/functions in expressions
|
|
|
|
|
|
|
|
|
| |
before issuing the usual "expr != expr" clause. The
"expr != expr" can be very expensive, and it's preferred
that the user not issue in_() if the list is empty,
instead simply not querying, or modifying the criterion
as appropriate for more complex situations.
[ticket:1628]
|
|
|
|
|
| |
cloned or adapted (occurs frequently in ORM operations).
[ticket:1641]
|