| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
See README.unittests for information on how to run
the tests. [ticket:970]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed an obscure feature of execute() (including connection,
engine, Session) whereby a bindparam() construct can be sent as
a key to the params dictionary. This usage is undocumented
and is at the core of an issue whereby the bindparam() object
created implicitly by a text() construct may have the same
hash value as a string placed in the params dictionary and
may result in an inappropriate match when computing the final
bind parameters. Internal checks for this condition would
add significant latency to the critical task of parameter
rendering, so the behavior is removed. This is a backwards
incompatible change for any application that may have been
using this feature, however the feature has never been
documented.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
SQL clause matches the clause used by get(), but
contains some parameters hardcoded. Previously
the lazy strategy would fail with the get(). Ideally
get() would be used with the hardcoded parameters
but this would require further development.
[ticket:1357]
|
| |
|
|
|
|
| |
when used in an unambiguously scalar context, i.e. it's used
in a comparison operation. This applies to
the ORM when using query.subquery() as well.
|
| |
|
|
|
| |
when used in a select() with use_labels (such as when used
in an ORM column_property()). [ticket:1302]
|
| |
|
|
|
|
|
|
| |
- Function rolls the various standalone execution functionality of CC into itself,
accesses its internal state more directly
- collate just uses _BinaryExpression, don't know why it didn't do this already
- added new _Case construct, compiles directly
- the world is a happier place
|
| |
|
|
|
|
| |
names from [ticket:1256]. Added more tests. MySQL and
Postgres dialects still do not issue correct CREATE TABLE
statements for identifiers with percent signs in them.
|
| |
|
|
| |
names. [ticket:1256]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as a column expression and it will be expanded.
Somewhat related to [ticket:1253].
- Query() is a little more robust when passed
various column expressions such as strings,
clauselists, text() constructs (which may mean
it just raises an error more nicely).
- select() can accept a ClauseList as a column
in the same way as a Table or other selectable
and the interior expressions will be used as
column elements. [ticket:1253]
- removed erroneous FooTest from test/orm/query
-This line, and those below, will be ignored--
M test/orm/query.py
M test/orm/mapper.py
M test/sql/select.py
M lib/sqlalchemy/orm/query.py
M lib/sqlalchemy/sql/expression.py
M CHANGES
|
| |
|
|
|
|
|
|
| |
any order_by() that has been applied to the
select()s inside. If you union() a
select() with order_by() (presumably to support
LIMIT/OFFSET), you should also call self_group()
on it to apply parenthesis.
|
| | |
|
| |
|
|
| |
Now results in inequality comparison against self. More portable, but breaks with stored procedures that aren't pure functions.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- The internal notion of an "OID" or "ROWID" column has been
removed. It's basically not used by any dialect, and the
possibility of its usage with psycopg2's cursor.lastrowid
is basically gone now that INSERT..RETURNING is available.
- Removed "default_order_by()" method on all FromClause
objects.
- profile/compile/select test is 8 function calls over on buildbot 2.4 for some reason, will adjust after checking
the results of this commit
|
| |
|
|
| |
the assumed default is dbo, whereas it could be modified by the connection. Allows SchemaTest.test_select to pass now.
|
| |
|
|
|
|
|
| |
- turned properties in sql/expressions.py to @property
- column.in_(someselect) can now be used as
a columns-clause expression without the subquery
bleeding into the FROM clause [ticket:1074]
|
| |
|
|
| |
- removed unneeded grouping from BooleanClauseList, generated needless parens
|
| |
|
|
|
|
|
|
|
|
|
| |
selectable by orm.query (they already had most ColumnElement
semantics).
- Added select_from() method to exists() construct, which becomes
more and more compatible with a regular select().
- Bind parameters/literals given a True/False value will detect
their type as Boolean
|
| |
|
|
|
|
|
|
|
| |
of elements as FROM clauses, allowing them to be used more
effectively in the columns clause of a SELECT.
- and_() and or_() now generate a ColumnElement, allowing
boolean expressions as result columns, i.e.
select([and_(1, 0)]). [ticket:798]
|
| |
|
|
|
| |
from [ticket:1068]. This feature is on hold
pending further development.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
own name
and not its contained expression, if the dialect reports true for supports_simple_order_by_label.
the flag is not propagated forwards, meant to closely mimic the syntax Postgres expects which is
that only a simple name can be in the ORDER BY, not a more complex expression or function call
with the label name embedded (mysql and sqlite support more complex expressions).
This further sets the standard for propigation of **kwargs within compiler, that we can't just send
**kwargs along blindly to each XXX.process() call; whenever a **kwarg needs to propagate through,
most methods will have to be aware of it and know when they should send it on forward and when not.
This was actually already the case with result_map as well.
The supports_simple_order_by dialect flag defaults to True but is conservatively explicitly set to
False on all dialects except SQLite/MySQL/Postgres to start.
[ticket:1068]
|
| | |
|
| |
|
|
| |
or select([bindparam('foo')]).
|
| |
|
|
| |
may be to have the correct default paramstyle set up on the MS-SQL dialect.
|
| |
|
|
| |
on PostgreSQL, SQLite, MySQL, MS-SQL, and Oracle backends.
|
| |
|
|
| |
0.4 development continues at /sqlalchemy/branches/rel_0_4
|
| | |
|
| |
|
|
|
|
|
| |
FROM clauses, such as select().select_from(text("sometext"))
[ticket:1014]
- removed _TextFromClause; _TextClause just adds necessary FromClause descriptors
at the class level
|
| | |
|
| |
|
|
|
|
|
| |
- this branch changes query.values() to immediately return an iterator, adds a new "aliased" construct which will be the primary method to get at aliased columns when using values()
- tentative ORM versions of _join and _outerjoin are not yet public, would like to integrate with Query better (work continues in the branch)
- lots of fixes to expressions regarding cloning and correlation. Some apparent ORM bug-workarounds removed.
- to fix a recursion issue with anonymous identifiers, bind parameters generated against columns now just use the name of the column instead of the tablename_columnname label (plus the unique integer counter). this way expensive recursive schemes aren't needed for the anon identifier logic. This, as usual, impacted a ton of compiler unit tests which needed a search-n-replace for the new bind names.
|
| |
|
|
| |
to a single, streamlined "_populate_column_collection" method called for all selectables
|
| |
|
|
| |
in embedded selects
|
| |
|
|
|
|
|
|
|
|
| |
ahead of the tablename in all column expressions as well
as when generating column labels. This prevents cross-
schema name collisions in all cases [ticket:999]
- the "use_schema" argument to compiler.visit_column() is removed. It uses
schema in all cases now.
- added a new test to the PG dialect to test roundtrip insert/update/delete/select
statements with full schema qualification
|
| |
|
|
|
|
| |
and have no FROM themselves. These are typically
used in a scalar context, i.e. SELECT x, (SELECT x WHERE y)
FROM table. Requires explicit correlate() call.
|
| | |
|
| |
|
|
|
|
| |
"escape=<somestring>", which is set as the escape character
using the syntax "x LIKE y ESCAPE '<somestring>'"
[ticket:993]
|
| |
|
|
| |
FROM clauses, [ticket:975]
|
| |
|
|
|
| |
tests extend from either TestBase or ORMTest, using additional mixins for
special assertion methods as needed
|
| |
|
|
|
|
|
| |
and update() constructs which return a new object with
criterion joined to existing criterion via AND, just
like select().where().
- compile assertions use assertEquals()
|
| | |
|
| |
|
|
|
|
|
| |
other tests to more specific modules
- added "now()" as a generic function; on SQLite and
Oracle compiles as "CURRENT_TIMESTAMP"; "now()"
on all others [ticket:943]
|
| | |
|
| |
|
|
|
|
|
|
|
| |
now concatenate the wildcard operator with the given
operand in SQL, i.e. "'%' || <bindparam>" in all cases,
accept text('something') operands properly [ticket:962]
- cast() accepts text('something') and other non-literal
operands properly [ticket:962]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- the '.c.' attribute on a selectable now gets an
entry for every column expression in its columns
clause; previously, "unnamed" columns like functions
and CASE statements weren't getting put there. Now
they will, using their full string representation
if no 'name' is available.
- The anonymous 'label' generated for otherwise
unlabeled functions and expressions now propagates
outwards at compile time for expressions like
select([select([func.foo()])])
- a CompositeSelect, i.e. any union(), union_all(),
intersect(), etc. now asserts that each selectable
contains the same number of columns. This conforms
to the corresponding SQL requirement.
- building on the above ideas, CompositeSelects
now build up their ".c." collection based on
the names present in the first selectable only;
corresponding_column() now works fully for all
embedded selectables.
|
| |
|
|
|
|
| |
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase
- testing.db has the configured db
- Fixed up the perf/* scripts
|
| | |
|
| |
|
|
|
| |
compiles to ILIKE on postgres, lower(x) LIKE lower(y)
on all others [ticket:727]
|
| |
|
|
| |
No surprises.
|
| | |
|
| |
|
|
| |
from FromClause objects can be unioned
|