Brad Allen [Tue, 16 Mar 2010 22:53:21 +0000 (16:53 -0600)]
Fixes to pass numeric tests; now by default, the mxodbc connector natively returns Python Decimal data types from columns of type SQL.NUMERIC or SQL.DECIMAL
Brad Allen [Tue, 16 Mar 2010 02:34:34 +0000 (20:34 -0600)]
Removed custom do_execute which called cursor.executedirect, after discussion with eGenix and zzzeek. Even though more tests pass with executedirect, it is not appropriate for default usage because it does not issue prepare statements to the db, and it forces Python type binding. The executedirect method should only be called when the API user specifically requests it for special case performance reasons.
Brad Allen [Mon, 15 Mar 2010 17:39:03 +0000 (11:39 -0600)]
using executemany instead of executedirect, which passes more tests than with plain execute. Later we need to define logic to determine when to call the normal execute.
Mike Bayer [Mon, 15 Mar 2010 17:08:31 +0000 (13:08 -0400)]
- The visit_pool() method of Dialect is removed, and replaced with
on_connect(). This method returns a callable which receives
the raw DBAPI connection after each one is created. The callable
is assembled into a first_connect/connect pool listener by the
connection strategy if non-None. Provides a simpler interface
for dialects.
Mike Bayer [Sun, 14 Mar 2010 23:03:24 +0000 (23:03 +0000)]
- many incantations to get the tests to run reasonably
- executemany() for some reason uses some tiny buffer, overriding it
- we need to use the IDENTITY_INSERT thing
Mike Bayer [Sun, 14 Mar 2010 22:04:20 +0000 (22:04 +0000)]
- initial working version of sybase, with modifications to the transactional
model to accomodate Sybase's default mode of "no ddl in transactions".
- identity insert not working yet. it seems the default here might be the
opposite of that of MSSQL.
- reflection will be a full rewrite
- default DBAPI is python-sybase, well documented and nicely DBAPI compliant
except for the bind parameter situation, where we have a straightforward workaround
- full Sybase docs at: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0/title.htm
Mike Bayer [Sun, 14 Mar 2010 01:05:17 +0000 (20:05 -0500)]
- Fixed bug in 0.6-reworked "many-to-one" optimizations
such that a many-to-one that is against a non-primary key
column on the remote table (i.e. foreign key against a
UNIQUE column) will pull the "old" value in from the
database during a change, since if it's in the session
we will need it for proper history/backref accounting,
and we can't pull from the local identity map on a
non-primary key column. [ticket:1737] (test is pending)
Mike Bayer [Sat, 13 Mar 2010 21:12:29 +0000 (16:12 -0500)]
- further checks when running in WITH_UNICODE
- When WITH_UNICODE
mode is used in Python 2.xx, a large and scary warning
is emitted asking that the user seriously consider
the usage of this difficult mode of operation.
[ticket:1670]
Mike Bayer [Sat, 13 Mar 2010 18:53:31 +0000 (13:53 -0500)]
- Added "logging_name" argument to create_engine(), Pool() constructor
as well as "pool_logging_name" argument to create_engine() which
filters down to that of Pool. Issues the given string name
within the "name" field of logging messages instead of the default
hex identifier string. [ticket:1555]
Mike Bayer [Sat, 13 Mar 2010 17:28:50 +0000 (12:28 -0500)]
- query.get() now returns None if queried for an identifier
that is present in the identity map with a different class
than the one requested, i.e. when using polymorphic loading.
[ticket:1727]
Mike Bayer [Fri, 12 Mar 2010 21:05:53 +0000 (21:05 +0000)]
- Added preliminary support for Oracle's WITH_UNICODE
mode. At the very least this establishes initial
support for cx_Oracle with Python 3.
[ticket:1670]
Mike Bayer [Fri, 12 Mar 2010 18:30:38 +0000 (18:30 +0000)]
- introduce an optimizing type _NativeUnicodeMixin to oracle plus supporting
changes to Enum/SchemaType to re-support adaptation of string types.
This approach can be adapted by "conditional" unicode returning dialects
(i.e. pyodbc and possibly mxodbc) to remove the overhead
of isinstance(value, unicode) calls when the dialect returned type is
of dbapi.UNICODE, dbapi.NVARCHAR, etc.
Mike Bayer [Fri, 12 Mar 2010 02:52:54 +0000 (21:52 -0500)]
add a third state to converts_unicode_strings - "conditional". at the moment
this will have us do a check. i.e. for MSSQL where NVARCHAR is unicode and VARCHAR is not.
Mike Bayer [Thu, 11 Mar 2010 23:04:57 +0000 (18:04 -0500)]
- Calling query.order_by() or query.distinct() before calling
query.select_from(), query.with_polymorphic(), or
query.from_statement() raises an exception now instead of
silently dropping those criterion. [ticket:1736]
Mike Bayer [Thu, 11 Mar 2010 18:01:04 +0000 (18:01 +0000)]
- fix the sqlalchemy.test.schema.Column function to work with copies
- add sequences to new associationproxy tests
- test/ext passes 100% on oracle here
Mike Bayer [Thu, 11 Mar 2010 15:27:18 +0000 (10:27 -0500)]
- Oracle 'DATE' now does not perform any result processing,
as the DATE type in Oracle stores full date+time objects,
that's what you'll get. Note that the generic types.Date
type *will* still call value.date() on incoming values,
however. When reflecting a table, the reflected type
will be 'DATE'.
Mike Bayer [Wed, 10 Mar 2010 23:29:32 +0000 (18:29 -0500)]
- emphasized query.join() in ORM tutorial as per [ticket:1708]
- cleaned up tutorial w.r.t. eagerload, added a section for contains_eager as this function
is equally important
- added better linkages in sqlalchemy.orm reference documentation, updated antiquated
docs for contains_eager(), got aliased()/AliasedClass documented as well as Sphinx will
allow us
Mike Bayer [Tue, 9 Mar 2010 22:46:00 +0000 (17:46 -0500)]
- moved the logic within _BindParamClause which decides about coercing the bind's type
based on the compared type into AbstractType. The new method is called _coerce_compared_value()
and receives the operator and the raw python value to be coerced. TypeDecorator
overrides this to provude the "old" 0.5 behavior of coercing the other side of the expression
unconditonally.
- added docs to TypeDecorator attempting to explain this though they are a little verbose.
- added caveats to Interval, which in "non-native" mode can't really handle proper expression behavior. the "typing" would have to move into the compiler, such that on a DB like SQLite we're actually wrapping left/right side into its epoch functions, etc., its a big job. current infrastructure, as powerful as it is, still isn't at that level.