Commit Graph

139 Commits

Author SHA1 Message Date
Mike Bayer 45650694ee fixed pydoc bug in [ticket:564] 2007-07-29 02:13:29 +00:00
Mike Bayer 34360bff78 added distinct positional dictionary arg to query.params(), fixes [ticket:690] 2007-07-27 21:10:12 +00:00
Mike Bayer 8db97dad98 fixed glitch in Select visit traversal, fixes #693 2007-07-27 16:46:11 +00:00
Mike Bayer ed4fc64bb0 merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to maintenance branch in branches/rel_0_3. 2007-07-27 04:08:53 +00:00
Rick Morrison 1c66e35132 mssql: added support for TIME type (simulated via DATETIME col) [ticket:679] 2007-07-26 16:51:09 +00:00
Paul Johnston a966505992 Properly escape table names when reflecting for mssql and sqlite [ticket:653] 2007-07-17 20:13:36 +00:00
Mike Bayer 8cb8daaafe - fixed "ambiguous column" result detection, when dupe col names exist
in a result [ticket:657]
2007-07-15 15:40:09 +00:00
Mike Bayer 471c3f8102 updated interval type for [ticket:595] 2007-07-15 15:29:41 +00:00
Mike Bayer e40a6183a0 - fixed unicode conversion in Oracle TEXT type 2007-07-15 04:24:41 +00:00
Mike Bayer 8889d2c1bc - improved ability to get the "correct" and most minimal set of primary key
columns from a join, equating foreign keys and otherwise equated columns.
  this is also mostly to help inheritance scenarios formulate the best
  choice of primary key columns.  [ticket:185]
- added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
2007-07-14 21:57:51 +00:00
Jason Kirtland fb6906bb79 Fix setup for standalone sequence test 2007-07-13 23:20:08 +00:00
Mike Bayer d947d6b79d changed "_source_column" to simpler "_distance" 2007-07-10 07:11:56 +00:00
Mike Bayer be29010e29 more "column targeting" enhancements..columns have a "depth" from their ultimate source column so that corresponding_column() can find the column that is "closest" (i.e. fewest levels of proxying) to the requested column 2007-07-10 06:51:58 +00:00
Jason Kirtland 177d30cc01 - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData instead
- Deprecated BoundMetaData- use MetaData instead
- Removed DMD and BMD from documentation
2007-07-06 00:58:09 +00:00
Mike Bayer 3f3d84e754 postgres:
- added support for reflection of domains [ticket:570]
    - types which are missing during reflection resolve to Null type
      instead of raising an error
    - moved reflection/types/query unit tests specific to postgres to new
      postgres unittest module
2007-06-29 23:50:25 +00:00
Ants Aasma 51c0d90c8d add missing grouping for compound selects. fixes ticket #623 2007-06-26 18:00:57 +00:00
Ants Aasma b191254d8a fix #624, modulo operator escaping on mysql and postgres
someone should test this with oracle, firebird and sql server also
2007-06-26 16:37:30 +00:00
Ants Aasma 987581e6d2 fix precedence of between (ticket #621) 2007-06-25 18:14:40 +00:00
Mike Bayer bc58df9c1f - fixed precedence of operators so that parenthesis are correctly applied
[ticket:620]
- calling <column>.in_() (i.e. with no arguments) will return
"CASE WHEN (<column> IS NULL) THEN NULL ELSE 0 END = 1)", so that
NULL or False is returned in all cases, rather than throwing an error
[ticket:545]
2007-06-25 17:07:25 +00:00
Mike Bayer f9dc30f239 added test for correlation of scalar subqueries to a JOIN object 2007-06-24 18:46:02 +00:00
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 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
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 2b2e27d886 CompoundSelect (i.e. UNION etc.) needed self_group() to provide parenthesis 2007-05-23 15:20:25 +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 1848439d44 restored outerjoin test 2007-05-15 16:51:40 +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
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 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 d03b5327b7 - 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)
2007-05-02 00:41:52 +00:00
Jason Kirtland 29c20992dc Removed an unneeded and troublesome subquery test. 2007-05-02 00:21:06 +00:00
Mike Bayer a19cec2de3 some notes on a labeling issue that arises when label truncation doesnt match col truncation 2007-05-01 18:11:24 +00:00
Jason Kirtland 546518d75c - 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
2007-05-01 00:05:47 +00:00
Mike Bayer 8d5a0729ab - 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.
2007-04-29 21:33:05 +00:00
Mike Bayer 8d2c9ae434 - 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)
2007-04-29 20:08:55 +00:00
Rick Morrison 22278d02b9 - 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]
2007-04-29 20:00:43 +00:00
Jason Kirtland 6a30f0ee37 - Fully specify ordering for ordered union test comparison 2007-04-27 00:29:23 +00:00
Mike Bayer 38c6c7ffdf - added a col label to help sqlite with order by 2007-04-24 21:51:40 +00:00
Mike Bayer 49f633b7d1 - 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
2007-04-24 21:33:07 +00:00
Jason Kirtland 93d212a138 - merged in the combined patch for #474, #475, #476 (attached to #476) and a new set of tests 2007-04-19 19:35:03 +00:00