string from each visit_XXXX method, so that the full string is compiled at once
without using any dictionary storage. dialects modified accordingly.
tested on mysql/sqlite/postgres fully,
tested with string-only tests for oracle/fb/informix/mssql so far.
by select().scalar() which returns a _ScalarSelect object, that obeys
the ColumnElement interface fully
- removed _selectable() method. replaced with __selectable__() as an optional
duck-typer; subclassing Selectable (without any __selectable__()) is equivalent
- query._col_aggregate() was assuming bound metadata. ick !
- probably should deprecate ClauseElement.scalar(), in favor of ClauseElement.execute().scalar()...
otherwise might need to rename select().scalar()
True for Numeric, False for Float. when True, values are returned as
decimal.Decimal objects; when False, values are returned as float().
the defaults of True/False are already the behavior for PG and MySQL's
DBAPI modules. [ticket:646]
- Connection's dealings with params are simplified; generation of
ClauseParameters pushed into DefaultDialect.
- simplified ClauseParameters.
- this is to make room for execute_raw() but I haven't decided how that
should look yet.
Cleaned up imports, all tests should be runnable stand-alone or suite now
Updated most of the perf tests
Removed dead test suites
Added new profiling decorator
Added new profilable perf test, 'ormsession' to try to capture a typical workload
- factored AliasedClauses out of EagerLoader into its own unit; Query makes heavy use of it for joins
- added support to Query for full interaction between aliased and nonalised joins with appended entities, columns, and externally-mapped columns
Column(), and func.<something>(), renamed to "type_". those objects
still name their "type" attribute as "type".
- new SQL operator implementation which removes all hardcoded operators
from expression structures and moves them into compilation;
allows greater flexibility of operator compilation; for example, "+"
compiles to "||" when used in a string context, or "concat(a,b)" on
MySQL; whereas in a numeric context it compiles to "+". fixes [ticket:475].
- major cruft cleanup in ANSICompiler regarding its processing of update/insert
bind parameters. code is actually readable !
- a clause element embedded in an UPDATE, i.e. for a correlated update, uses
standard "grouping" rules now to place parenthesis. Doesn't change much, except
if you embed a text() clause in there, it will not be automatically parenthesized
(place parens in the text() manually).
- built extensible operator framework in sql package, ORM
builds on top of it to shuttle python operator objects back down
to the individual columns. no relation() comparisons yet. implements
half of [ticket:643]
- also some tweaks to unicode result column names; no longer chopping out characters from the names, since the name might be composed of all non-ascii characters. mysql needs some work here since its returning, i think, the unicode's internally-encoded bytes directly within a bytestring.
- need to simplify the amount of dictionaries present in ANSICompiler, its pretty hard to follow at this point.
function which attempts to map DBAPI types to TypeEngine instances
at result time. This only occurs for statements that have no typemaps
(i.e. textual statements).
- copy_container() removed. ClauseVisitor.traverse() now features "clone"
flag which allows traversal with copy-and-modify-in-place behavior
- select() objects copyable now [ticket:52] [ticket:569]
- improved support for custom column_property() attributes which
feature correlated subqueries...work better with eager loading now.
- accept_visitor() methods removed. ClauseVisitor now genererates method
names based on class names, or an optional __visit_name__ attribute. calls
regular visit_XXX methods as they exist, can optionally call an additional
"pre-descent" enter_XXX method to allow stack-based operations on traversals
- select() and union()'s now have "generative" behavior. methods like
order_by() and group_by() return a *new* instance - the original instance
is left unchanged. non-generative methods remain as well.
- the internals of select/union vastly simplified - all decision making
regarding "is subquery" and "correlation" pushed to SQL generation phase.
select() elements are now *never* mutated by their enclosing containers
or by any dialect's compilation process
test-run- and dialect-specific options on those objects
All tests re-pointed to go through the interceptors
- Removed mysql_engine= from table declarations, replaced with a general
flag indicating storage requirements
- Added ability to choose a global MySQL storage engine for all tests
--mysql-engine=<whatever>
If none is specified, tests use the old db-default/InnoDB behavior
- Added ability to append arbitrary table creation params
--table-option=KEY=VALUE
For MySQL 3, use this to set mysql_type instead of --mysql-engine
- Removed a couple dead test modules
would not return selectable.c.col, if the selectable is a join
of a table and another join involving the same table. messed
up ORM decision making [ticket:593]
- removed is_natural_case function from ANSIIdentifierPreparer
- got all tests/extensions working with new APIs
- axed proxyengine until further notice
- SelectResults folds into a 10 line wrapper for Query, loses join_to() (use join())
- test cleanup
uses operator precedence to more intelligently apply parenthesis
to clauses, provides cleaner nesting of clauses (doesnt mutate
clauses placed in other clauses, i.e. no 'parens' flag)
- added 'modifier' keyword, works like func.<foo> except does not
add parenthesis. e.g. select([modifier.DISTINCT(...)]) etc.
enum's allowed range on insert and update, with strict=True
- Added new 'dialect' category of unit tests, and migrated MySQL-specific
dialect tests there.
- Noted the max identifier length in the MySQL dialect (the max alias length,
actually)