]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
16 years ago- Added PGUuid and PGBit types to
Mike Bayer [Sun, 1 Mar 2009 20:24:02 +0000 (20:24 +0000)] 
- Added PGUuid and PGBit types to
sqlalchemy.databases.postgres. [ticket:1327]

- Refection of unknown PG types won't crash when those
types are specified within a domain.  [ticket:1327]

- executemany() in conjunction with INSERT..RETURNING is documented as undefined by psycopg2.

16 years ago- Fixed adaptation of EXISTS clauses via any(), has(), etc.
Mike Bayer [Thu, 26 Feb 2009 15:16:06 +0000 (15:16 +0000)] 
- Fixed adaptation of EXISTS clauses via any(), has(), etc.
in conjunction with an aliased object on the left and
of_type() on the right.  [ticket:1325]

16 years agoFix markup glitch
Lele Gaifax [Wed, 25 Feb 2009 13:20:38 +0000 (13:20 +0000)] 
Fix markup glitch

16 years ago- pared down private and semi-private functions in the attributes package.
Mike Bayer [Mon, 23 Feb 2009 00:08:37 +0000 (00:08 +0000)] 
- pared down private and semi-private functions in the attributes package.
- simplified the process of establishment and unestablishment of
class management from a mapper perspective; class manager setup/teardown
is now symmetric (ClassManager would never be fully de-associated previously).
- class manager now unconditionally decorates __init__.  this has a slight
behavior change for an unmapped subclass of a mapped superclass, in that
InstanceState creation corresponds to that of the superclass.  This
still doesn't allow unmapped subclasses to be usable in mapper
situations, though.

16 years ago- Declarative will accept a table-bound column as a property
Mike Bayer [Sun, 22 Feb 2009 19:35:36 +0000 (19:35 +0000)] 
- Declarative will accept a table-bound column as a property
when used in conjunction with __table__, if the column is already
present in __table__.  The column will be remapped to the given
key the same way as when added to the mapper() properties dict.

16 years ago- Query won't fail with weakref error when a non-mapper/class
Mike Bayer [Fri, 20 Feb 2009 15:45:25 +0000 (15:45 +0000)] 
- Query won't fail with weakref error when a non-mapper/class
instrumented descriptor is passed, raises
"Invalid column expession".

16 years ago- Declarative locates the "inherits" class using a search
Mike Bayer [Thu, 19 Feb 2009 15:48:37 +0000 (15:48 +0000)] 
- Declarative locates the "inherits" class using a search
through __bases__, to skip over mixins that are local
to subclasses.

16 years agofix docstring indent in orm.util.with_parent
Gaëtan de Menten [Thu, 19 Feb 2009 07:40:25 +0000 (07:40 +0000)] 
fix docstring indent in orm.util.with_parent

16 years agoCorrected issue on mssql where max_identifier_length was not being respected.
Michael Trier [Wed, 18 Feb 2009 03:34:58 +0000 (03:34 +0000)] 
Corrected issue on mssql where max_identifier_length was not being respected.

16 years ago- Session.scalar() now converts raw SQL strings to text()
Mike Bayer [Tue, 17 Feb 2009 23:10:52 +0000 (23:10 +0000)] 
- Session.scalar() now converts raw SQL strings to text()
the same way Session.execute() does and accepts same
alternative **kw args.

16 years ago- Declarative will properly interpret the "foreign_keys" argument
Mike Bayer [Tue, 17 Feb 2009 22:09:30 +0000 (22:09 +0000)] 
- Declarative will properly interpret the "foreign_keys" argument
on a backref() if it's a string.

16 years ago- Fixed a recursive pickling issue in serializer, triggered
Mike Bayer [Tue, 17 Feb 2009 12:56:48 +0000 (12:56 +0000)] 
- Fixed a recursive pickling issue in serializer, triggered
  by an EXISTS or other embedded FROM construct.

16 years ago- Declarative figures out joined-table inheritance primary join
Mike Bayer [Mon, 16 Feb 2009 23:49:53 +0000 (23:49 +0000)] 
- Declarative figures out joined-table inheritance primary join
condition even if "inherits" mapper argument is given
explicitly.  Allows mixins to be used with joined table
inheritance.

16 years ago- Added an attribute helper method ``set_committed_value`` in
Mike Bayer [Sun, 15 Feb 2009 20:43:14 +0000 (20:43 +0000)] 
- Added an attribute helper method ``set_committed_value`` in
sqlalchemy.orm.attributes.  Given an object, attribute name,
and value, will set the value on the object as part of its
"committed" state, i.e. state that is understood to have
been loaded from the database.   Helps with the creation of
homegrown collection loaders and such.
- documented public attributes helper functions.

16 years ago- annotations store 'parententity' as well as 'parentmapper'
Mike Bayer [Fri, 13 Feb 2009 18:08:40 +0000 (18:08 +0000)] 
- annotations store 'parententity' as well as 'parentmapper'
- ORMAdapter filters all replacements against a non-compatible 'parentmapper' annotation
- Other filterings, like
query(A).join(A.bs).filter(B.foo=='bar'), were erroneously
adapting "B.foo" as though it were an "A".

16 years agoPreliminary support for pymssql 1.0.1 [Ticket:1318]
Rick Morrison [Fri, 13 Feb 2009 17:18:52 +0000 (17:18 +0000)] 
Preliminary support for pymssql 1.0.1 [Ticket:1318]

16 years ago- Fixed bugs in Query regarding simultaneous selection of
Mike Bayer [Fri, 13 Feb 2009 17:14:05 +0000 (17:14 +0000)] 
- Fixed bugs in Query regarding simultaneous selection of
multiple joined-table inheritance entities with common base
classes, previously the adaption applied to "e2" on
"e1 JOIN e2" would be partially applied to "e1".  Additionally,
comparisons on relations (i.e. Entity2.related==e2)
were not getting adapted correctly.

16 years agomove test by itself so that no fixture data is inserted
Mike Bayer [Thu, 12 Feb 2009 16:02:23 +0000 (16:02 +0000)] 
move test by itself so that no fixture data is inserted

16 years ago- a session.expire() on a particular collection attribute
Mike Bayer [Wed, 11 Feb 2009 20:38:30 +0000 (20:38 +0000)] 
- a session.expire() on a particular collection attribute
will clear any pending backref additions as well, so that
the next access correctly returns only what was present
in the database.  Presents some degree of a workaround for
[ticket:1315], although we are considering removing the
flush([objects]) feature altogether.

16 years ago- Added "post_configure_attribute" method to InstrumentationManager,
Mike Bayer [Wed, 11 Feb 2009 18:23:35 +0000 (18:23 +0000)] 
- Added "post_configure_attribute" method to InstrumentationManager,
so that the "listen_for_events.py" example works again.
[ticket:1314]

16 years agofix Query.update docstring
Gaëtan de Menten [Tue, 10 Feb 2009 11:25:25 +0000 (11:25 +0000)] 
fix Query.update docstring

16 years ago- anonymous alias names now truncate down to the max length
Mike Bayer [Tue, 10 Feb 2009 01:20:45 +0000 (01:20 +0000)] 
- anonymous alias names now truncate down to the max length
allowed by the dialect.  More significant on DBs like
Oracle with very small character limits. [ticket:1309]

16 years agoneed sizes for mysql
Mike Bayer [Sat, 7 Feb 2009 22:18:40 +0000 (22:18 +0000)] 
need sizes for mysql

16 years ago- When flushing partial sets of objects using session.flush([somelist]),
Mike Bayer [Sat, 7 Feb 2009 21:57:30 +0000 (21:57 +0000)] 
- When flushing partial sets of objects using session.flush([somelist]),
pending objects which remain pending after the operation won't
inadvertently be added as persistent. [ticket:1306]

16 years ago- PG Index reflection won't fail when an index with
Mike Bayer [Tue, 3 Feb 2009 00:22:01 +0000 (00:22 +0000)] 
- PG Index reflection won't fail when an index with
multiple expressions is encountered.

16 years agofix docstring typo
Gaëtan de Menten [Mon, 2 Feb 2009 09:32:56 +0000 (09:32 +0000)] 
fix docstring typo

16 years ago- Fixed missing _label attribute on Function object, others
Mike Bayer [Sun, 1 Feb 2009 18:20:20 +0000 (18:20 +0000)] 
- Fixed missing _label attribute on Function object, others
when used in a select() with use_labels (such as when used
in an ORM column_property()).  [ticket:1302]

16 years agoAdded a few IDENTITY tests for mssql.
Michael Trier [Sat, 31 Jan 2009 21:20:04 +0000 (21:20 +0000)] 
Added a few IDENTITY tests for mssql.

16 years agodetect backref string as basestring, not str. [ticket:1301]
Mike Bayer [Fri, 30 Jan 2009 22:47:28 +0000 (22:47 +0000)] 
detect backref string as basestring, not str. [ticket:1301]

16 years agoappease older sqlite version
Mike Bayer [Thu, 29 Jan 2009 17:03:49 +0000 (17:03 +0000)] 
appease older sqlite version

16 years agofix serialize
Mike Bayer [Thu, 29 Jan 2009 17:03:04 +0000 (17:03 +0000)] 
fix serialize

16 years ago- The per-dialect cache used by TypeEngine to cache
Mike Bayer [Thu, 29 Jan 2009 16:09:14 +0000 (16:09 +0000)] 
- The per-dialect cache used by TypeEngine to cache
dialect-specific types is now a WeakKeyDictionary.
This to prevent dialect objects from
being referenced forever for an application that
creates an arbitrarily large number of engines
or dialects.   There is a small performance penalty
which will be resolved in 0.6.  [ticket:1299]

16 years ago- improvements to the "determine direction" logic of
Mike Bayer [Thu, 29 Jan 2009 06:40:29 +0000 (06:40 +0000)] 
- improvements to the "determine direction" logic of
relation() such that the direction of tricky situations
like mapper(A.join(B)) -> relation-> mapper(B) can be
determined.

16 years agosome docstring stuff
Mike Bayer [Wed, 28 Jan 2009 16:44:57 +0000 (16:44 +0000)] 
some docstring stuff

16 years agounit test fixes
Mike Bayer [Wed, 28 Jan 2009 16:00:16 +0000 (16:00 +0000)] 
unit test fixes

16 years ago- _CalculatedClause is gone
Mike Bayer [Wed, 28 Jan 2009 01:28:20 +0000 (01:28 +0000)] 
- _CalculatedClause is gone
- Function rolls the various standalone execution functionality of CC into itself,
accesses its internal state more directly
- collate just uses _BinaryExpression, don't know why it didn't do this already
- added new _Case construct, compiles directly
- the world is a happier place

16 years ago- Query now implements __clause_element__() which produces
Mike Bayer [Tue, 27 Jan 2009 01:05:20 +0000 (01:05 +0000)] 
- Query now implements __clause_element__() which produces
its selectable, which means a Query instance can be accepted
in many SQL expressions, including col.in_(query),
union(query1, query2), select([foo]).select_from(query),
etc.

- the __selectable__() interface has been replaced entirely
by __clause_element__().

16 years agofurther fixes to sphinx.sty per progress on the sphinx trunk
Mike Bayer [Sat, 24 Jan 2009 22:42:30 +0000 (22:42 +0000)] 
further fixes to sphinx.sty per progress on the sphinx trunk

16 years agocreate correct hyperlink for the pdf file
Mike Bayer [Sat, 24 Jan 2009 19:51:32 +0000 (19:51 +0000)] 
create correct hyperlink for the pdf file

16 years ago- 0.5.3
Mike Bayer [Sat, 24 Jan 2009 19:37:41 +0000 (19:37 +0000)] 
- 0.5.3
- add new directives to sphinx.sty.  pdf output is still currently busted for other reasons, however.

16 years ago- refined and clarified query.__join() for readability rel_0_5_2
Mike Bayer [Sat, 24 Jan 2009 17:29:56 +0000 (17:29 +0000)] 
- refined and clarified query.__join() for readability
- _ORMJoin() gets a new flag join_to_left to specify if
we really want to alias from the existing left side or not.  eager loading
wants this flag off in almost all cases, query.join() usually wants it on.
- query.join()/outerjoin() will now properly join an aliased()
construct to the existing left side, even if query.from_self()
or query.select_from(someselectable) has been called.
[ticket:1293]

16 years agomoved the non-expire of unloaded deferred attributes into the attributes package
Mike Bayer [Sat, 24 Jan 2009 15:43:05 +0000 (15:43 +0000)] 
moved the non-expire of unloaded deferred attributes into the attributes package

16 years ago- session.expire() and related methods will not expire() unloaded
Mike Bayer [Sat, 24 Jan 2009 00:22:49 +0000 (00:22 +0000)] 
- session.expire() and related methods will not expire() unloaded
deferred attributes.  This prevents them from being needlessly
loaded when the instance is refreshed.

16 years agoCorrection to reflection fix r5718 to handle Binary / other numeric types.
Michael Trier [Fri, 23 Jan 2009 01:45:20 +0000 (01:45 +0000)] 
Correction to reflection fix r5718 to handle Binary / other numeric types.

16 years agomssql: modified table reflection code to use only kwargs when constructing coldefs.
Rick Morrison [Fri, 23 Jan 2009 00:53:32 +0000 (00:53 +0000)] 
mssql: modified table reflection code to use only kwargs when constructing coldefs.

16 years ago- Fixed an eager loading bug whereby self-referential eager
Mike Bayer [Thu, 22 Jan 2009 18:28:27 +0000 (18:28 +0000)] 
- Fixed an eager loading bug whereby self-referential eager
loading would prevent other eager loads, self referential or not,
from joining to the parent JOIN properly.  Thanks to Alex K
for creating a great test case.

16 years ago- Adjusted the attribute instrumentation change from 0.5.1 to
Mike Bayer [Thu, 22 Jan 2009 03:55:48 +0000 (03:55 +0000)] 
- Adjusted the attribute instrumentation change from 0.5.1 to
fully establish instrumentation for subclasses where the mapper
was created after the superclass had already been fully
instrumented. [ticket:1292]

16 years agoTrying one more time to get the decimal handling on mssql right. Closes #1282.
Michael Trier [Thu, 22 Jan 2009 01:55:06 +0000 (01:55 +0000)] 
Trying one more time to get the decimal handling on mssql right. Closes #1282.

16 years agoRestored convert_unicode handling on mssql. Fixes #1291.
Michael Trier [Thu, 22 Jan 2009 01:46:04 +0000 (01:46 +0000)] 
Restored convert_unicode handling on mssql. Fixes #1291.

16 years ago- Further refined 0.5.1's warning about delete-orphan cascade
Mike Bayer [Tue, 20 Jan 2009 21:35:57 +0000 (21:35 +0000)] 
- Further refined 0.5.1's warning about delete-orphan cascade
placed on a many-to-many relation.   First, the bad news:
the warning will apply to both many-to-many as well as
many-to-one relations.  This is necessary since in both
cases, SQLA does not scan the full set of potential parents
when determining "orphan" status - for a persistent object
it only detects an in-python de-association event to establish
the object as an "orphan".  Next, the good news: to support
one-to-one via a foreign key or assocation table, or to
support one-to-many via an association table, a new flag
single_parent=True may be set which indicates objects
linked to the relation are only meant to have a single parent.
The relation will raise an error if multiple parent-association
events occur within Python.

- Fixed bug in delete-orphan cascade whereby two one-to-one
relations from two different parent classes to the same target
class would prematurely expunge the instance.  This is
an extension of the non-ticketed fix in r4247.

- the order of "sethasparent" flagging in relation to
AttributeExtensions has been refined such that false setparents
are issued before the event, true setparents issued afterwards.
event handlers "know" that a remove event originates
from a non-orphan but need to know if its become an orphan,
and that append events will become non-orphans but need to know
if the event originates from a non-orphan.

16 years agoadded some missing internal types for reflection, [ticket:1287]
Mike Bayer [Tue, 20 Jan 2009 04:12:00 +0000 (04:12 +0000)] 
added some missing internal types for reflection, [ticket:1287]

16 years agoremove comparison/group by on TEXT columns
Mike Bayer [Mon, 19 Jan 2009 22:28:48 +0000 (22:28 +0000)] 
remove comparison/group by on TEXT columns

16 years ago- Further fixes to the "percent signs and spaces in column/table
Mike Bayer [Sun, 18 Jan 2009 17:08:28 +0000 (17:08 +0000)] 
- Further fixes to the "percent signs and spaces in column/table
names" functionality. [ticket:1284]
- Still doesn't work for PG/MySQL, which unfortunately would require
post_process_text() calls all over the place.  Perhaps % escaping
can be assembled into IdentifierPreparer.quote() since that's where
identifier names are received.

16 years agodont need pre-0.5 note rel_0_5_1
Mike Bayer [Sat, 17 Jan 2009 21:43:19 +0000 (21:43 +0000)] 
dont need pre-0.5 note

16 years agoCorrected handling of large decimal values on mssql. Added more robust tests.
Michael Trier [Sat, 17 Jan 2009 20:57:18 +0000 (20:57 +0000)] 
Corrected handling of large decimal values on mssql. Added more robust tests.

- Removed string manipulation on floats. Float types are now passed through
  to mssql as is.
- Fixes #1280

16 years agomore session updates
Mike Bayer [Sat, 17 Jan 2009 20:06:54 +0000 (20:06 +0000)] 
more session updates

16 years agodocstring fixup
Mike Bayer [Sat, 17 Jan 2009 19:30:32 +0000 (19:30 +0000)] 
docstring fixup

16 years agofix errant foreign key
Mike Bayer [Sat, 17 Jan 2009 19:28:46 +0000 (19:28 +0000)] 
fix errant foreign key

16 years agofixed more save/clear calls
Mike Bayer [Sat, 17 Jan 2009 19:07:19 +0000 (19:07 +0000)] 
fixed more save/clear calls

16 years ago- The "clear()", "save()", "update()", "save_or_update()"
Mike Bayer [Sat, 17 Jan 2009 18:19:29 +0000 (18:19 +0000)] 
- The "clear()", "save()", "update()", "save_or_update()"
Session methods have been deprecated, replaced by
"expunge_all()" and "add()".  "expunge_all()" has also
been added to ScopedSession.

16 years agoexplicit rollback to get the connection back to the pool
Mike Bayer [Sat, 17 Jan 2009 17:04:51 +0000 (17:04 +0000)] 
explicit rollback to get the connection back to the pool

16 years agoWeakCompositeKey was coded incorrectly and was not weakly referencing anything. ...
Mike Bayer [Sat, 17 Jan 2009 06:27:02 +0000 (06:27 +0000)] 
WeakCompositeKey was coded incorrectly and was not weakly referencing anything.  However when repaired, the usage within RelationLoader._create_joins() still creates cycles between key elements and the value placed in the dict.  In the interests of risk reduction, WCK is now removed and the two caches it was used for are now non-cached.  Speed comparisons with one join/eager-heavy web application show no noticeable effect in response time.

16 years ago- misc savepoint test
Mike Bayer [Fri, 16 Jan 2009 20:16:31 +0000 (20:16 +0000)] 
- misc savepoint test
- don't need dialect_impl() for Text

16 years ago- Using delete-orphan on a many-to-many relation is deprecated.
Mike Bayer [Thu, 15 Jan 2009 18:08:48 +0000 (18:08 +0000)] 
- Using delete-orphan on a many-to-many relation is deprecated.
This produces misleading or erroneous results since SQLA does
not retrieve the full list of "parents" for m2m.  To get delete-orphan
behavior with an m2m table, use an explcit association class
so that the individual association row is treated as a parent.
[ticket:1281]

- delete-orphan cascade always requires delete cascade.  Specifying
delete-orphan without delete now raises a deprecation warning.
[ticket:1281]

16 years ago- Query.from_self() as well as query.subquery() both disable
Mike Bayer [Thu, 15 Jan 2009 17:08:56 +0000 (17:08 +0000)] 
- Query.from_self() as well as query.subquery() both disable
the rendering of eager joins inside the subquery produced.
The "disable all eager joins" feature is available publically
via a new query.enable_eagerloads() generative. [ticket:1276]
- Added a rudimental series of set operations to Query that
receive Query objects as arguments, including union(),
union_all(), intersect(), except_(), insertsect_all(),
except_all().  See the API documentation for
Query.union() for examples.
- Fixed bug that prevented Query.join() and eagerloads from
attaching to a query that selected from a union or aliased union.

16 years ago- use ForeignKey.column as _colspec source in Column._make_proxy(), preventing needless
Mike Bayer [Wed, 14 Jan 2009 20:48:01 +0000 (20:48 +0000)] 
- use ForeignKey.column as _colspec source in Column._make_proxy(), preventing needless
redundant string arithmetic in memoized ForeignKey.column method
- _pre_existing_column attribute becomes optional, only needed for original Table-bound column, not proxies
- compare two ForeignKeys based on target_fullname, don't assume self._colspec is a string
- Fixed bug when overriding a Column with a ForeignKey
on a reflected table, where derived columns (i.e. the
"virtual" columns of a select, etc.) would inadvertently
call upon schema-level cleanup logic intended only
for the original column. [ticket:1278]

16 years ago- Improved the methodology to handling percent signs in column
Mike Bayer [Wed, 14 Jan 2009 19:55:20 +0000 (19:55 +0000)] 
- Improved the methodology to handling percent signs in column
names from [ticket:1256].  Added more tests.  MySQL and
Postgres dialects still do not issue correct CREATE TABLE
statements for identifiers with percent signs in them.

16 years agoFix a hyperref
Lele Gaifax [Wed, 14 Jan 2009 17:02:17 +0000 (17:02 +0000)] 
Fix a hyperref

16 years agoprefer this methods
Mike Bayer [Tue, 13 Jan 2009 15:56:51 +0000 (15:56 +0000)] 
prefer this methods

16 years ago- It's an error to add new Column objects to a declarative class
Mike Bayer [Tue, 13 Jan 2009 15:45:59 +0000 (15:45 +0000)] 
- It's an error to add new Column objects to a declarative class
that specified an existing table using __table__.

16 years ago- Column with no name (as in declarative) won't raise a
Mike Bayer [Tue, 13 Jan 2009 15:38:38 +0000 (15:38 +0000)] 
- Column with no name (as in declarative) won't raise a
NoneType error when it's string output is requsted
(such as in a stack trace).

16 years ago- Fixed a bug with the unitofwork's "row switch" mechanism,
Mike Bayer [Tue, 13 Jan 2009 06:11:17 +0000 (06:11 +0000)] 
- Fixed a bug with the unitofwork's "row switch" mechanism,
i.e. the conversion of INSERT/DELETE into an UPDATE, when
combined with joined-table inheritance and an object
which contained no defined values for the child table where
an UPDATE with no SET clause would be rendered.

16 years ago- Tightened up **kw on ColumnProperty and its front-end functions.
Jason Kirtland [Tue, 13 Jan 2009 02:43:52 +0000 (02:43 +0000)] 
- Tightened up **kw on ColumnProperty and its front-end functions.

16 years agohappy new year
Mike Bayer [Mon, 12 Jan 2009 21:19:11 +0000 (21:19 +0000)] 
happy new year

16 years ago- Can now specify Column objects on subclasses which have no
Mike Bayer [Mon, 12 Jan 2009 20:36:06 +0000 (20:36 +0000)] 
- Can now specify Column objects on subclasses which have no
table of their own (i.e. use single table inheritance).
The columns will be appended to the base table, but only
mapped by the subclass.

- For both joined and single inheriting subclasses, the subclass
will only map those columns which are already mapped on the
superclass and those explicit on the subclass.  Other
columns that are present on the `Table` will be excluded
from the mapping by default, which can be disabled
by passing a blank `exclude_properties` collection to the
`__mapper_args__`.  This is so that single-inheriting
classes which define their own columns are the only classes
to map those columns.   The effect is actually a more organized
mapping than you'd normally get with explicit `mapper()`
calls unless you set up the `exclude_properties` arguments
explicitly.

- docs/tests

16 years agooh, its UNION ordering that's changing
Mike Bayer [Mon, 12 Jan 2009 16:50:19 +0000 (16:50 +0000)] 
oh, its UNION ordering that's changing

16 years agomore comparator tweaks
Mike Bayer [Mon, 12 Jan 2009 16:28:01 +0000 (16:28 +0000)] 
more comparator tweaks

16 years agoEnsure RowTuple names are correct by adding "key" to QueryableAttribute.
Mike Bayer [Mon, 12 Jan 2009 15:58:09 +0000 (15:58 +0000)] 
Ensure RowTuple names are correct by adding "key" to QueryableAttribute.

16 years agosuspect the InstrumentedSet/set comparison is failing for some reason
Mike Bayer [Mon, 12 Jan 2009 04:04:33 +0000 (04:04 +0000)] 
suspect the InstrumentedSet/set comparison is failing for some reason

16 years ago*more* sqlite appeasement
Mike Bayer [Mon, 12 Jan 2009 00:12:10 +0000 (00:12 +0000)] 
*more* sqlite appeasement

16 years agomysql/pg sensitive fixes
Mike Bayer [Mon, 12 Jan 2009 00:06:47 +0000 (00:06 +0000)] 
mysql/pg sensitive fixes

16 years agodon't INSERT a blank row if no rows passed. (breaks all the tests for SQLite on the...
Mike Bayer [Sun, 11 Jan 2009 23:55:35 +0000 (23:55 +0000)] 
don't INSERT a blank row if no rows passed. (breaks all the tests for SQLite on the buildbot....)

16 years agoNotSupportedError is a DBAPI wrapper which takes four args and is expected to origina...
Mike Bayer [Sun, 11 Jan 2009 23:37:19 +0000 (23:37 +0000)] 
NotSupportedError is a DBAPI wrapper which takes four args and is expected to originate from the DBAPI layer.
Moved those error throws to CompileError/InvalidRequestError.

16 years agoadded an order by
Mike Bayer [Sun, 11 Jan 2009 23:34:36 +0000 (23:34 +0000)] 
added an order by

16 years ago- Concrete inheriting mappers now instrument attributes which are inherited from...
Mike Bayer [Sun, 11 Jan 2009 22:41:20 +0000 (22:41 +0000)] 
- Concrete inheriting mappers now instrument attributes which are inherited from the superclass, but are not defined for the concrete mapper itself, with an InstrumentedAttribute that issues a descriptive error when accessed.  [ticket:1237]
- Added a new `relation()` keyword `back_populates`.  This allows configuation of backreferences using explicit relations. [ticket:781]  This is required when creating bidirectional relations between a hierarchy of concrete mappers and another class. [ticket:1237]
- Test coverage added for `relation()` objects specified on concrete mappers. [ticket:1237]
- A short documentation example added for bidirectional relations specified on concrete mappers. [ticket:1237]
- Mappers now instrument class attributes upon construction with the final InstrumentedAttribute object which remains persistent.  The `_CompileOnAttr`/`__getattribute__()` methodology has been removed.  The net effect is that Column-based mapped class attributes can now be used fully at the class level without invoking a mapper compilation operation, greatly simplifying typical usage patterns within declarative. [ticket:1269]
- Index now accepts column-oriented InstrumentedAttributes (i.e. column-based mapped class attributes) as column arguments.  [ticket:1214]
- Broke up attributes.register_attribute into two separate functions register_descriptor and register_attribute_impl.    The first assembles an InstrumentedAttribute or Proxy descriptor, the second assembles the AttributeImpl inside the InstrumentedAttribute.  register_attribute remains for outside compatibility.  The argument lists have been simplified.
- Removed class_manager argument from all but MutableScalarAttributeImpl (the branch had removed class_ as well but this has been reverted locally to support the serializer extension).
- Mapper's previous construction of _CompileOnAttr now moves to a new MapperProperty.instrument_class() method which is called on all MapperProperty objects at the moment the mapper receives them. All MapperProperty objects now call attributes.register_descriptor within that method to assemble an InstrumentedAttribute object directly.
- InstrumentedAttribute now receives the "property" attribute from the given PropComparator.  The guesswork within the constructor is removed, and allows "property" to serve as a mapper compilation trigger.
- RelationProperty.Comparator now triggers compilation of its parent mapper within a util.memoized_property accessor for the "property" attribute, which is used instead of "prop" (we can probably remove "prop").
- ColumnProperty and similar handle most of their initialization in their __init__ method since they must function fully at the class level before mappers are compiled.
- SynonymProperty and ComparableProperty move their class instrumentation logic to the new instrument_class() method.
- LoaderStrategy objects now add their state to existing InstrumentedAttributes using attributes.register_attribute_impl.  Both column and relation-based loaders instrument in the same way now, with a unique InstrumentedAttribute *and* a unique AttributeImpl for each class in the hierarchy.  attribute.parententity should now be correct in all cases.
- Removed unitofwork.register_attribute, and simpified the _register_attribute methods into a single function in strategies.py.  unitofwork exports the UOWEventHandler extension directly.
- To accomodate the multiple AttributeImpls across a class hierarchy, the sethasparent() method now uses an optional "parent_token" attribute to identify the "parent".  AbstractRelationLoader sends the MapperProperty along to serve as this token.  If the token isn't present (which is only the case in the attributes unit tests), the AttributeImpl is used instead, which is essentially the same as the old behavior.
- Added new ConcreteInheritedProperty MapperProperty.  This is invoked for concrete mappers within _adapt_inherited_property() to accomodate concrete mappers which inherit unhandled attributes from the base class, and basically raises an exception upon access.  [ticket:1237]
- attributes.register_attribute and register_descriptor will now re-instrument an attribute unconditionally without checking for a previous attribute.  Not sure if this is controversial. It's needed so that ConcreteInheritedProperty instrumentation can be overridden by an incoming legit MapperProperty without any complexity.
- Added new UninstrumentedColumnLoader LoaderStrategy.  This is used by the polymorphic_on argument when the given column is not represented within the mapped selectable, as is typical with a concrete scenario which maps to a polymorphic union.  It does not configure class instrumentation, keeping polymorphic_on from getting caught up in the new concrete attribute-checking logic.
- RelationProperty now records its "backref" attributes using a set assigned to `_reverse_property` instead of a scalar.  The `back_populates` keyword allows any number of properties to be involved in a single bidirectional relation.  Changes were needed to RelationProperty.merge(), DependencyProcessor to accomodate for the new multiple nature of this attribute.
- Generalized the methodology used by ManyToManyDP to check for "did the other dependency already handle this direction", building on the `_reverse_property` collection.
- post_update logic within dependency.py moves to use the same methodology as ManyToManyDP so that "did the other dependency do this already" checks are made to be specific to the two dependent instances.
- Caught that RelationProperty.merge() was writing to instance.__dict__ directly (!) - repaired to talk to instance_state.dict.
- Removed needless eager loading example from concrete mapper docs.
- Added test for [ticket:965].
- Added the usual Node class/nodes table to orm/_fixtures.py, but haven't used it for anything yet.   We can potentially update test/orm/query.py to use this fixture.
- Other test/documentation cleanup.

16 years agoCorrected SAVEPOINT support on the adodbapi dialect by changing the handling
Michael Trier [Sun, 11 Jan 2009 19:15:37 +0000 (19:15 +0000)] 
Corrected SAVEPOINT support on the adodbapi dialect by changing the handling
of savepoint_release, which is unsupported on mssql.

The way it was being discarded previously resulted in an empty execute being
called on the dialect; adodbapi didn't like that much.

16 years agoModified the do_begin handling in mssql to use the Cursor not the Connection.
Michael Trier [Sun, 11 Jan 2009 19:15:30 +0000 (19:15 +0000)] 
Modified the do_begin handling in mssql to use the Cursor not the Connection.

This corrects a problem where we were trying to call execute on the Connection
object instead of against the cursor. This is supported on pyodbc but not in
the DBAPI. Overrode the behavior in pymssql to not do special do_begin
processing on that dialect.

16 years ago- 0.5.1 bump
Mike Bayer [Sun, 11 Jan 2009 16:45:45 +0000 (16:45 +0000)] 
- 0.5.1 bump
- modernized mapper()/no table exception
- added __tablename__ exception to declarative since ppl keep complaining

16 years agoclarified docs on foreign key cascades, mapper extension methods during delete()...
Mike Bayer [Sat, 10 Jan 2009 01:30:56 +0000 (01:30 +0000)] 
clarified docs on foreign key cascades, mapper extension methods during delete() and update() methods

16 years agoquery.delete(False) is not so bad
Mike Bayer [Thu, 8 Jan 2009 15:33:34 +0000 (15:33 +0000)] 
query.delete(False) is not so bad

16 years agoAdded the missing keywords from MySQL 4.1 so they get escaped properly.
Ants Aasma [Thu, 8 Jan 2009 15:16:32 +0000 (15:16 +0000)] 
Added the missing keywords from MySQL 4.1 so they get escaped properly.

16 years agotypo
Mike Bayer [Wed, 7 Jan 2009 01:13:29 +0000 (01:13 +0000)] 
typo

16 years agoFormatting fixups
Jason Kirtland [Tue, 6 Jan 2009 19:11:06 +0000 (19:11 +0000)] 
Formatting fixups

16 years agodoh its 0.5.0
Mike Bayer [Tue, 6 Jan 2009 19:04:08 +0000 (19:04 +0000)] 
doh its 0.5.0

16 years agomove memusage to the isolation chamber rel_0_5_0
Mike Bayer [Tue, 6 Jan 2009 18:30:38 +0000 (18:30 +0000)] 
move memusage to the isolation chamber

16 years ago- removed 2.3 compat stuff
Mike Bayer [Tue, 6 Jan 2009 18:19:59 +0000 (18:19 +0000)] 
- removed 2.3 compat stuff
- updated MANIFEST for the newer build

16 years agonext release is 0.5.0
Mike Bayer [Tue, 6 Jan 2009 17:15:27 +0000 (17:15 +0000)] 
next release is 0.5.0

16 years ago- query.join() raises an error when the target of the join
Mike Bayer [Tue, 6 Jan 2009 04:30:11 +0000 (04:30 +0000)] 
- query.join() raises an error when the target of the join
doesn't match the property-based attribute - while it's
unlikely anyone is doing this, the SQLAlchemy author was
guilty of this particular loosey-goosey behavior.

16 years agoForgot to sqash a commit. Follow up on mssql dates refactoring.
Michael Trier [Mon, 5 Jan 2009 22:33:09 +0000 (22:33 +0000)] 
Forgot to sqash a commit. Follow up on mssql dates refactoring.

16 years agomssql date / time refactor.
Michael Trier [Mon, 5 Jan 2009 22:05:51 +0000 (22:05 +0000)] 
mssql date / time refactor.
- Added new MSSmallDateTime, MSDateTime2, MSDateTimeOffset, MSTime types
- Refactored the Date/Time types. The smalldatetime data type no longer
  truncates to a date only, and will now be mapped to the MSSmallDateTime
  type. Closes #1254.