Mike Bayer [Sat, 26 May 2007 21:29:50 +0000 (21:29 +0000)]
added hotshot points into unit test, localizes profiling to just the query.select() process.
0.4 branch now has 18% fewer function calls for the same test.
Jason Kirtland [Fri, 25 May 2007 22:48:42 +0000 (22:48 +0000)]
- Nearly all MySQL column types are now supported for declaration and
reflection. Added NCHAR, NVARCHAR, VARBINARY, TINYBLOB, LONGBLOB, YEAR
- The sqltypes.Binary passthrough now builds a VARBINARY rather than a
BINARY if given a length
- Refactored the inheritance of some types with respect to sqltypes, and
especially the binary types
- Lots and lots of docs
- MySQL unit tests now starting to adapt to known problems with alpha/beta
drivers
- A couple mysql unit test fix-ups and expansions
Jason Kirtland [Fri, 25 May 2007 22:30:39 +0000 (22:30 +0000)]
- DB connection urls for tests can now be loaded from a configuration file
- Test runs can now --require a particular external package version
- Added some 'coerce' magic to the Oracle connection factory to support use_ansi in the dburl query string
Mike Bayer [Tue, 22 May 2007 16:47:55 +0000 (16:47 +0000)]
- improved support for eagerloading of properties off of mappers that are mapped
to select() statements; i.e. eagerloader is better at locating the correct
selectable with which to attach its LEFT OUTER JOIN.
- some fixes to new tests in inheritance5 to work with postgres
Mike Bayer [Thu, 17 May 2007 22:33:52 +0000 (22:33 +0000)]
- the "primary_key" argument to mapper() is propigated to the "polymorphic"
mapper. primary key columns in this list get normalized to that of the mapper's
local table.
Mike Bayer [Thu, 17 May 2007 15:11:34 +0000 (15:11 +0000)]
- fix to select_by(<propname>=<object instance>) -style joins in conjunction
with many-to-many relationships, bug introduced in r2556
- the "reverse_direction" flag in _create_lazy_clause works correctly for a many-to-many
relationship (i.e. the reverse is on which clause, not which column in the clause, in the
case of m2m)
Mike Bayer [Mon, 14 May 2007 22:25:36 +0000 (22:25 +0000)]
- parenthesis are applied to clauses via a new _Grouping construct.
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.
Mike Bayer [Fri, 4 May 2007 18:27:12 +0000 (18:27 +0000)]
- many-to-many relationships properly set the type of bind params
for delete operations on the association table
- many-to-many relationships check that the number of rows deleted
from the association table by a delete operation matches the expected
results
Mike Bayer [Fri, 4 May 2007 01:54:34 +0000 (01:54 +0000)]
clarifying some cascade-based unit tests, adding a little more coverage,
and trying to remove unneeded parts of dependency.py cascades.
also de-emphasizing the whole session.flush([oneobject]) thing since i dont really
agree it should be supported
Mike Bayer [Thu, 3 May 2007 22:31:52 +0000 (22:31 +0000)]
- _Label class overrides compare_self to return its ultimate object.
meaning, if you say someexpr.label('foo') == 5, it produces
the correct "someexpr == 5".
Jason Kirtland [Wed, 2 May 2007 00:41:52 +0000 (00:41 +0000)]
- MySQL ENUM types can now optionally ensure that values are within the
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)
Jason Kirtland [Tue, 1 May 2007 00:05:47 +0000 (00:05 +0000)]
- allow MySQL column-level CHARACTER SET and COLLATE, plus shortcuts like
ASCII, UNICODE, and BINARY. support NATIONAL.
- added MySQL-specific reserved words
- added tests for MySQL numeric and string column DDL generation
- various minor cleanups, also tweak regex to not break emacs syntax hilighting
Mike Bayer [Sun, 29 Apr 2007 22:26:39 +0000 (22:26 +0000)]
- restored old "column_property()" ORM function (used to be called
"column()") to force any column expression to be added as a property
on a mapper, particularly those that aren't present in the mapped
selectable. this allows "scalar expressions" of any kind to be
added as relations (though they have issues with eager loads).
Mike Bayer [Sun, 29 Apr 2007 21:33:05 +0000 (21:33 +0000)]
- the label() method on ColumnElement will properly propigate the
TypeEngine of the base element out to the label, including a label()
created from a scalar=True select() statement.
Mike Bayer [Sun, 29 Apr 2007 20:08:55 +0000 (20:08 +0000)]
- mysql uses "DESCRIBE [<schemaname>].<tablename>", catching exceptions
if table doesnt exist, in order to determine if a table exists.
this supports unicode table names as well as schema names. tested
with MySQL5 but should work with 4.1 series as well. (#557)
Rick Morrison [Sun, 29 Apr 2007 20:00:43 +0000 (20:00 +0000)]
- mssql: replace "select @@identity" with "select @@scope_identity". Should help avoid returning wrong ID when insert triggers are used. Also add unit test (thanks paj)
- mssql: if no db-api module specified, probe in the order [pyodbc, pymssql, adodbapi]
Mike Bayer [Fri, 27 Apr 2007 17:19:39 +0000 (17:19 +0000)]
- the usual adjustments to relationships between inheriting mappers,
in this case establishing relation()s to subclass mappers where
the join conditions come from the superclass' table
- specifically, places where PropertyLoader limits its search to mapper.local_table had to be expanded
to search separately within mapper.mapped_table as well. in the case of determining primary/secondaryjoin, it starts more specifically first with local table then out to mapped table if not found. in the case of determining direction, it starts more generally with mapped table, then if ambiguous direction, goes to the local tables.
Mike Bayer [Thu, 26 Apr 2007 18:04:09 +0000 (18:04 +0000)]
- generative test doesnt apply to mysql, others
- refactoring to unitofwork.py. low-hanging cruft
removed, UOWTask structure simplified particuularly with the
per-instance sort phase, most methods docstring'ed extensively.
this is a merge from the 'uowsimplify' branch. (only slightly simpler, tho)
- mapper delete_obj works across multiple mappers to be consistent
with the operation of save_obj
Mike Bayer [Thu, 26 Apr 2007 16:25:13 +0000 (16:25 +0000)]
- _with_parent_criterion generalized into _with_lazy_criterion
- _create_lazy_clause now includes a 'reverse_direction' flag to generate lazy criterion
in from parent->child or vice versa
- changed join_by() in query to use the "reverse" _create_lazy_clause for instance comparisons
so conditions like AND can work [ticket:554]
Mike Bayer [Tue, 24 Apr 2007 21:33:07 +0000 (21:33 +0000)]
- fix to case() construct to propigate the type of the first
WHEN condition as the return type of the case statement
- various unit test tweaks to get oracle working