Mike Bayer [Fri, 2 Jan 2009 18:22:50 +0000 (18:22 +0000)]
- Custom comparator classes used in conjunction with
column_property(), relation() etc. can define
new comparison methods on the Comparator, which will
become available via __getattr__() on the
InstrumentedAttribute. In the case of synonym()
or comparable_property(), attributes are resolved first
on the user-defined descriptor, then on the user-defined
comparator.
Mike Bayer [Sun, 28 Dec 2008 22:32:04 +0000 (22:32 +0000)]
- Added OracleNVarchar type, produces NVARCHAR2, and also
subclasses Unicode so that convert_unicode=True by default.
NVARCHAR2 reflects into this type automatically so
these columns pass unicode on a reflected table with no explicit
convert_unicode=True flags. [ticket:1233]
Mike Bayer [Sun, 28 Dec 2008 21:48:12 +0000 (21:48 +0000)]
- Can pass mapped attributes and column objects as keys
to query.update({}). [ticket:1262]
- Mapped attributes passed to the values() of an
expression level insert() or update() will use the
keys of the mapped columns, not that of the mapped
attribute.
Michael Trier [Sun, 28 Dec 2008 21:07:57 +0000 (21:07 +0000)]
Added in a new MSGenericBinary type.
This maps to the Binary type so it can implement the specialized behavior of
treating length specified types as fixed-width Binary types and non-length
types as an unbound variable length Binary type.
Michael Trier [Sun, 28 Dec 2008 01:46:44 +0000 (01:46 +0000)]
MSSQL refactoring of BINARY type and addition of MSVarBinary and MSImage.
- Added in new types: MSVarBinary and MSImage
- Modified MSBinary to now return BINARY instead of IMAGE. This is a
backwards incompatible change. Closes #1249.
Mike Bayer [Sat, 27 Dec 2008 18:45:41 +0000 (18:45 +0000)]
- Added a mutex for the initial pool creation when
using pool.manage(dbapi). This prevents a minor
case of "dogpile" behavior which would otherwise
occur upon a heavy load startup. [ticket:799]
Mike Bayer [Fri, 26 Dec 2008 05:28:38 +0000 (05:28 +0000)]
- Reflected foreign keys will properly locate
their referenced column, even if the column
was given a "key" attribute different from
the reflected name. This is achieved via a
new flag on ForeignKey/ForeignKeyConstraint
called "link_to_name", if True means the given
name is the referred-to column's name, not its
assigned key.
[ticket:650]
- removed column types from sqlite doc, we
aren't going to list out "implementation" types
since they aren't significant and are less present
in 0.6
- mysql will report on missing reflected foreign
key targets in the same way as other dialects
(we can improve that to be immediate within
reflecttable(), but it should be within
ForeignKeyConstraint()).
- postgres dialect can reflect table with
an include_columns list that doesn't include
one or more primary key columns
Mike Bayer [Wed, 24 Dec 2008 04:47:06 +0000 (04:47 +0000)]
- Exceptions raised during compile_mappers() are now
preserved to provide "sticky behavior" - if a hasattr()
call on a pre-compiled mapped attribute triggers a failing
compile and suppresses the exception, subsequent compilation
is blocked and the exception will be reiterated on the
next compile() call. This issue occurs frequently
when using declarative.
Michael Trier [Mon, 22 Dec 2008 20:20:55 +0000 (20:20 +0000)]
Major refactoring of the MSSQL dialect. Thanks zzzeek.
Includes simplifying the IDENTITY handling and the exception handling. Also
includes a cleanup of the connection string handling for pyodbc to favor
the DSN syntax.
Mike Bayer [Thu, 18 Dec 2008 18:11:12 +0000 (18:11 +0000)]
merge the test/ directory from -r5438:5439 of py3k_warnings branch. this gives
us a 2.5-frozen copy of unittest so we're insulated from unittest changes.
Mike Bayer [Thu, 18 Dec 2008 17:57:15 +0000 (17:57 +0000)]
merged -r5299:5438 of py3k warnings branch. this fixes some sqlite py2.6 testing issues,
and also addresses a significant chunk of py3k deprecations. It's mainly
expicit __hash__ methods. Additionally, most usage of sets/dicts to store columns uses
util-based placeholder names.
Mike Bayer [Thu, 18 Dec 2008 16:50:49 +0000 (16:50 +0000)]
- Query() can be passed a "composite" attribute
as a column expression and it will be expanded.
Somewhat related to [ticket:1253].
- Query() is a little more robust when passed
various column expressions such as strings,
clauselists, text() constructs (which may mean
it just raises an error more nicely).
- select() can accept a ClauseList as a column
in the same way as a Table or other selectable
and the interior expressions will be used as
column elements. [ticket:1253]
- removed erroneous FooTest from test/orm/query
-This line, and those below, will be ignored--
M test/orm/query.py
M test/orm/mapper.py
M test/sql/select.py
M lib/sqlalchemy/orm/query.py
M lib/sqlalchemy/sql/expression.py
M CHANGES
Mike Bayer [Wed, 17 Dec 2008 23:09:51 +0000 (23:09 +0000)]
- _execute_clauseelement() goes back to being
a private method. Subclassing Connection
is not needed now that ConnectionProxy
is available.
- tightened the interface for the various _execute_XXX()
methods to reduce ambiguity
- __distill_params() no longer creates artificial [{}] entry,
blank dict is no longer passed through to do_execute()
in any case unless explicitly sent from the outside
as in connection.execute("somestring"), {})
- fixed a few old sql.query tests which were doing that
- removed needless do_execute() from mysql dialect
- fixed charset param not properly being sent to
_compat_fetchone() in mysql
Mike Bayer [Wed, 17 Dec 2008 20:12:07 +0000 (20:12 +0000)]
- added sphinx handler to allow __init__ methods through
- sqlite module documentation
- some corrections to pool docs
- the example in URL.translate_connect_args() never made any sense anyway so removed it
Michael Trier [Fri, 12 Dec 2008 04:49:24 +0000 (04:49 +0000)]
Support for three levels of column nullability: NULL, NOT NULL, and the database's configured default.
The default Column configuration (nullable=True) will now generate NULL in the DDL. Previously no specification was emitted and the database default would take effect (usually NULL, but not always). To explicitly request the database default, configure columns with nullable=None and no specification will be emitted in DDL. Fixes #1243.
Mike Bayer [Thu, 11 Dec 2008 17:27:33 +0000 (17:27 +0000)]
- PickleType now favors == comparison by default,
if the incoming object (such as a dict) implements
__eq__(). If the object does not implement
__eq__() and mutable=True, a deprecation warning
is raised.
Mike Bayer [Wed, 10 Dec 2008 02:16:52 +0000 (02:16 +0000)]
- reworked the "SQL assertion" code to something more flexible and based off of ConnectionProxy. upcoming changes to dependency.py
will make use of the enhanced flexibility.
Mike Bayer [Mon, 8 Dec 2008 21:32:29 +0000 (21:32 +0000)]
- restored the previous API Reference structure
- bumped latex TOC structure, the PDF looks great
- but we need to fix the translate_connect_args docstring bug to really have PDF
Mike Bayer [Sun, 7 Dec 2008 23:58:02 +0000 (23:58 +0000)]
- moved index.rst around to have the API docs right there, no "Main Documentation" chapter which is fairly needless. this all allows PDF to have a decent TOC on the side with only two levels (can we change that ?)
- added LatexFormatter.
- PDF wont work until issue with the docstirng in url.py/URL.translate_connect_args is fixed.
Mike Bayer [Sun, 7 Dec 2008 06:30:00 +0000 (06:30 +0000)]
- re-documented Table and Column constructors, fixed case sensitivity description [ticket:1231]
- turned on autoclass_content="both". Need to specify __init__ docstring with a newline after the """.
- other docs
Mike Bayer [Sat, 6 Dec 2008 23:47:21 +0000 (23:47 +0000)]
- removed creepy exec call for now
- removed unnecessary isinstance() from class_mapper()
- removed unnecessary and py3k incompatible "dictionary sort" from association table delete
Mike Bayer [Sat, 6 Dec 2008 16:59:48 +0000 (16:59 +0000)]
- merged -r5338:5429 of sphinx branch.
- Documentation has been converted to Sphinx.
In particular, the generated API documentation
has been constructed into a full blown
"API Reference" section which organizes
editorial documentation combined with
generated docstrings. Cross linking between
sections and API docs are vastly improved,
a javascript-powered search feature is
provided, and a full index of all
classes, functions and members is provided.
Mike Bayer [Sat, 6 Dec 2008 00:14:50 +0000 (00:14 +0000)]
- union() and union_all() will not whack
any order_by() that has been applied to the
select()s inside. If you union() a
select() with order_by() (presumably to support
LIMIT/OFFSET), you should also call self_group()
on it to apply parenthesis.