0.1.4
-- create_engine() now uses genericized parameters; host/hostname, db/dbname/database, password/passwd, etc. for all engine connections. makes engine URIs much more "universal"
+- create_engine() now uses genericized parameters; host/hostname, db/dbname/database,
+password/passwd, etc. for all engine connections. makes engine URIs much more "universal"
- added support for SELECT statements embedded into a column clause, using the flag
"scalar=True"
- another overhaul to EagerLoading when used in conjunction with mappers that
exception. also adds selectfirst_by (synonymous with get_by) and selectone_by
- added onupdate parameter to Column, will exec SQL/python upon an update
statement.Also adds "for_update=True" to all DefaultGenerator subclasses
-- added user-contributed support for Oracle table reflection; still
-some bugs to work out regarding composite primary keys/dictionary selection
+- added support for Oracle table reflection contributed by Andrija Zaric;
+still some bugs to work out regarding composite primary keys/dictionary selection
- checked in an initial Firebird module, awaiting testing.
- added sql.ClauseParameters dictionary object as the result for
compiled.get_params(), does late-typeprocessing of bind parameters so
- added 'encoding="utf8"' parameter to engine. the given encoding will be
used for all encode/decode calls within Unicode types as well as Strings
when convert_unicode=True.
+- improved support for mapping against UNIONs, added polymorph.py example
+to illustrate multi-class mapping against a UNION
+- fix to SQLite LIMIT/OFFSET syntax
+- fix to Oracle LIMIT syntax
+- added backref() function, allows backreferences to have keyword arguments
+that will be passed to the backref.
+- Sequences and ColumnDefault objects can do execute()/scalar() standalone
+- SQL functions (i.e. func.foo()) can do execute()/scalar() standalone
+- fix to SQL functions so that the ANSI-standard functions, i.e. current_timestamp
+etc., do not specify parenthesis. all other functions do.
+- added settattr_clean and append_clean to SmartProperty, which set
+attributes without triggering a "dirty" event or any history. used as:
+myclass.prop1.setattr_clean(myobject, 'hi')
- improved support to column defaults when used by mappers; mappers will pull
pre-executed defaults from statement's executed bind parameters
(pre-conversion) to populate them into a saved object's attributes; if any
- improvements to SQL func calls including an "engine" keyword argument so
they can be execute()d or scalar()ed standalone, also added func accessor to
SQLEngine
+- fix to MySQL4 custom table engines, i.e. TYPE instead of ENGINE
+- slightly enhanced logging, includes timestamps and a somewhat configurable
+formatting system, in lieu of a full-blown logging system
+- improvements to the ActiveMapper class from the TG gang, including
+many-to-many relationships
+- added Double and TinyInt support to mysql
0.1.3
- completed "post_update" feature, will add a second update statement before
True
</&>
-+<p>The backreference feature also works with many-to-many relationships, which are described later. When creating a backreference, a corresponding property is placed on the child mapper. This property can be overridden with a custom property using the <span class="codeline">add_property</span> function:
++<p>The backreference feature also works with many-to-many relationships, which are described later. When creating a backreference, a corresponding property is placed on the child mapper. The default arguments to this property can be overridden using the <span class="codeline">backref()</span> function:
<&|formatting.myt:code&>
Address.mapper = mapper(Address, addresses)
User.mapper = mapper(User, users, properties = {
- 'addresses' : relation(Address.mapper, backref='user')
+ 'addresses' : relation(Address.mapper, backref=backref('user', lazy=False, private=True))
}
)
-
- Address.mapper.add_property('user', relation(
- User.mapper, lazy=False, private=True, backref='addresses'
- ))
-
</&>
<p>Note that when overriding a backreferenced property, we re-specify the backreference as well. This will not override the existing 'addresses' property on the User class, but just sends a message to the attribute-management system that it should continue to maintain this backreference.</p>
</&>