Commit Graph

5242 Commits

Author SHA1 Message Date
Mike Bayer 7cfd3973ce - fixed "where"/"from" criterion of select() to accept a unicode string
in addition to regular string - both convert to text()
2007-06-23 18:47:28 +00:00
Mike Bayer 1af29a42d2 - added dialect flag "auto_convert_lobs", defaults to True; will cause any
LOB objects detected in a result set to be forced into OracleBinary
so that the LOB is read() automatically, if no typemap was present
(i.e., if a textual execute() was issued).
2007-06-22 15:36:54 +00:00
Mike Bayer 3c1a7710f0 - added standalone distinct() function in addition to column.distinct()
[ticket:558]
2007-06-21 17:42:42 +00:00
Mike Bayer a1fe6e2c76 - forwards-compatibility with 0.4: added one(), first(), and
all() to Query
- added selectone_by() to assignmapper
2007-06-20 22:28:54 +00:00
Mike Bayer 48ebb102ea - added synchronization to the mapper() construction step, to avoid
thread collections when pre-existing mappers are compiling in a
different thread [ticket:613]
2007-06-20 21:08:10 +00:00
Mike Bayer 33648e7176 - fixed very stupid bug when deleting items with many-to-many
uselist=False relations
2007-06-20 18:53:33 +00:00
Mike Bayer 6ba5ecb379 - added Interval type to types.py [ticket:595] 2007-06-17 01:18:31 +00:00
Mike Bayer 909758df8e - result.last_inserted_ids() should return a list that is identically
sized to the primary key constraint of the table.  values that were
"passively" created and not available via cursor.lastrowid will be None.
- sqlite: string PK column inserts dont get overwritten with OID [ticket:603]
2007-06-17 00:49:08 +00:00
Mike Bayer 23525a3ea8 - datetime fixes: got subsecond TIMESTAMP to work [ticket:604],
added OracleDate which supports types.Date with only year/month/day
2007-06-17 00:13:31 +00:00
Mike Bayer 93215f429d - sqlite better handles datetime/date/time objects mixed and matched
with various Date/Time/DateTime columns
2007-06-17 00:10:04 +00:00
Mike Bayer d1e474ed74 test case for oracle timestamp adaption 2007-06-16 23:36:19 +00:00
Jason Kirtland 6cd584d303 - Fixed typo blocking some assoc proxy dict assignments, added test 2007-06-16 22:04:13 +00:00
Jason Kirtland 84420a1d0f - Iteration over dict association proxies is now dict-like, not
InstrumentedList-like (e.g. over keys instead of values).
- Don't tightly bind proxies to source collections (fixes #597)
- Handle slice objects on orderinglist's __setitem__
2007-06-14 00:11:51 +00:00
Paul Johnston 2c65ce7536 Multiple MSSQL fixes; see ticket #581 2007-06-13 18:53:16 +00:00
Jason Kirtland e4cd7b2ed4 - MySQL TEXT-derived types weren't respecting convert_unicode, fixes #601
- unicode type test now exercises Unicode() and Unicode(len)
2007-06-13 17:47:54 +00:00
Mike Bayer bf8d8436ec extra test for corresponding column fix 2007-06-07 03:02:03 +00:00
Mike Bayer a74da6d21e - fixed bug where selectable.corresponding_column(selectable.c.col)
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]
2007-06-06 23:37:18 +00:00
Mike Bayer cbc33de2fe pg test wasnt really working with that particular default..its a TODO 2007-06-02 20:33:15 +00:00
Jonathan Ellis 96ee77cd09 fix running tests on Windows 2007-06-01 04:55:17 +00:00
Jason Kirtland 2aa07d6d4d - Pulling pyformat test for MySQL-python, which fails on 3 driver versions
(1.2.2b3, 1.2.2c1, 1.2.2)
2007-06-01 01:24:27 +00:00
Jason Kirtland 0a713f408d - Emit BOOL rather than BOOLEAN for MySQL booleans in DDL, for old versions
of MySQL (#583)
- MySQL columns (such as times) with colons in their default values couldn't
  be roundtripped, fixed  (also in Postgres, but not fixed here.)
- BINARY/VARBINARY columns aren't really binary at all on ancient versions
  of MySQL.  The type.Binary(123) passthrough now always makes BLOBs.
  Removed the short-lived MSBaseBinary.
- Added mysql.get_version_info, given a connectable returns a tuple of server
  version info.
- Backed off on the reflection tests for older versions of MySQL, for now.
2007-05-31 22:56:24 +00:00
Mike Bayer 9547241012 fixed two bad __init__ calls 2007-05-27 21:04:15 +00:00
Mike Bayer cbdb5464fe remove unneeded division 2007-05-26 22:21:31 +00:00
Mike Bayer 87b8ca1323 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.
2007-05-26 21:29:50 +00:00
Mike Bayer 4004bf6a0a normalized PG test schema name to "alt_schema" 2007-05-26 19:51:35 +00:00
Mike Bayer 379e210383 - mysql doesnt have + for concatenation, but pg doesnt have concat() (nor does sqlite)
- parameterized masseagerload test
2007-05-26 19:41:31 +00:00
Jason Kirtland 91e8b20f52 - 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
2007-05-25 22:48:42 +00:00
Jason Kirtland bb02957181 - Don't use '+' for sql expr concatenation by default 2007-05-25 22:34:02 +00:00
Jason Kirtland 5b8e4947d7 - Setup/teardown out test table properly 2007-05-25 22:32:34 +00:00
Jason Kirtland ea652e9d10 - 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
2007-05-25 22:30:39 +00:00
Mike Bayer 2b2e27d886 CompoundSelect (i.e. UNION etc.) needed self_group() to provide parenthesis 2007-05-23 15:20:25 +00:00
Mike Bayer 4937f49bd8 - 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
2007-05-22 16:47:55 +00:00
Mike Bayer 8405d1267c restored comparison of 1-element clause list -> ClauseElement, which was broken in [changeset:2620] 2007-05-20 18:16:10 +00:00
Mike Bayer 555ab611f1 - fixed bug in query.instances() that wouldnt handle more than
on additional mapper or one additional column.
2007-05-20 16:40:21 +00:00
Mike Bayer 9102d678ab - removed "no group by's in a select thats part of a UNION"
restriction [ticket:578]
2007-05-18 19:01:47 +00:00
Mike Bayer c5530d15b3 - 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.
2007-05-17 22:33:52 +00:00
Mike Bayer 779068fb41 - 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)
2007-05-17 15:11:34 +00:00
Mike Bayer dd96699bdd added test for "assign a list of objects", ensure cascade/persistence functions 2007-05-17 14:43:19 +00:00
Mike Bayer 1848439d44 restored outerjoin test 2007-05-15 16:51:40 +00:00
Mike Bayer b3817dc8c2 - fix to polymorphic query which allows the original polymorphic_union
to be embedded into a correlated subquery [ticket:577]
2007-05-15 16:43:26 +00:00
Mike Bayer ae4b954b1a - 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.
2007-05-14 22:25:36 +00:00
Mike Bayer 3de128138a - _Label propigates "_hide_froms()" so that scalar selects
behave more properly with regards to FROM clause #574
2007-05-11 00:21:29 +00:00
Jason Kirtland 98207edf30 - Connections can be detached from their pool, closing on dereference instead of returning to the pool for reuse 2007-05-09 22:39:50 +00:00
Mike Bayer e23c3a8974 - fix to long name generation when using oid_column as an order by
(oids used heavily in mapper queries)
2007-05-07 20:29:26 +00:00
Mike Bayer cea2e8fa64 - 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
2007-05-04 18:27:12 +00:00
Mike Bayer f8e8161cc9 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
2007-05-04 01:54:34 +00:00
Mike Bayer 591b1d975b - "delete-orphan" no longer implies "delete". ongoing effort to
separate the behavior of these two operations.
2007-05-03 23:32:11 +00:00
Mike Bayer 752ef2802c - _Label class overrides compare_self to return its ultimate object.
meaning, if you say someexpr.label('foo') == 5, it produces
the correct "someexpr == 5".
2007-05-03 22:31:52 +00:00
Jason Kirtland 76a1d1276c Oops, Python 2.5 ternary operator snuck in. 2007-05-03 21:51:34 +00:00
Jason Kirtland 5606c01d39 - Test assoc proxy lazy loads, fixed __set__ race on single scalar assocs 2007-05-03 18:22:31 +00:00