Commit Graph

131 Commits

Author SHA1 Message Date
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
Mike Bayer 4fffc21c87 - the "where" criterion of an update() and delete() now correlates
embedded select() statements against the table being updated or
deleted.  this works the same as nested select() statement
correlation, and can be disabled via the correlate=False flag on
the embedded select().
2007-04-18 22:54:40 +00:00
Mike Bayer aabb6e530b - the dialects within sqlalchemy.databases become a setuptools
entry points. loading the built-in database dialects works the
same as always, but if none found will fall back to trying
pkg_resources to load an external module [ticket:521]
2007-04-17 20:49:35 +00:00
Mike Bayer 07cd648f3f - got unicode schemas to work with postgres
- unicode schema with mysql slightly improved, still cant do has_table
- got reflection of unicode schemas working with sqlite, pg, mysql
2007-04-15 22:04:53 +00:00
Mike Bayer b9ce8e38c9 - small fix to allow successive compiles of the same SELECT object
which features LIMIT/OFFSET.  oracle dialect needs to modify
the object to have ROW_NUMBER OVER and wasn't performing
the full series of steps on successive compiles.
2007-04-13 22:22:07 +00:00
Mike Bayer aee39b2847 - the "mini" column labels generated when using subqueries, which
are to work around glitchy SQLite behavior that doesnt understand
"foo.id" as equivalent to "id", are now only generated in the case
that those named columns are selected from (part of [ticket:513])
- MS-SQL better detects when a query is a subquery and knows not to
generate ORDER BY phrases for those [ticket:513]
2007-04-11 20:55:27 +00:00
Mike Bayer cdceb3c371 - merged the "execcontext" branch, refactors engine/dialect codepaths
- much more functionality moved into ExecutionContext, which impacted
the API used by dialects to some degree
- ResultProxy and subclasses now designed sanely
- merged patch for #522, Unicode subclasses String directly,
MSNVarchar implements for MS-SQL, removed MSUnicode.
- String moves its "VARCHAR"/"TEXT" switchy thing into
"get_search_list()" function, which VARCHAR and CHAR can override
to not return TEXT in any case (didnt do the latter yet)
- implements server side cursors for postgres, unit tests, #514
- includes overhaul of dbapi import strategy #480, all dbapi
importing happens in dialect method "dbapi()", is only called
inside of create_engine() for default and threadlocal strategies.
Dialect subclasses have a datamember "dbapi" referencing the loaded
module which may be None.
- added "mock" engine strategy, doesnt require DBAPI module and
gives you a "Connecition" which just sends all executes to a callable.
can be used to create string output of create_all()/drop_all().
2007-04-02 21:36:11 +00:00
Mike Bayer e9bbf54b71 added keys() to ColumnParameters, needed for setbindparamsizes traversal 2007-03-28 23:30:22 +00:00
Mike Bayer c13846c6b6 - sending None as an argument to func.<something> will produce
an argument of NULL
2007-03-28 23:18:04 +00:00