Mike Bayer [Sun, 22 Oct 2006 00:24:26 +0000 (00:24 +0000)]
- attributes module and test suite moves underneath 'orm' package
- fixed table comparison example in metadata.txt
- docstrings all over the place
- renamed mapper _getattrbycolumn/_setattrbycolumn to get_attr_by_column,set_attr_by_column
- removed frommapper parameter from populate_instance(). the two operations can be performed separately
- fix to examples/adjacencytree/byroot_tree.py to fire off lazy loaders upon load, to reduce query calling
- added get(), get_by(), load() to MapperExtension
- re-implemented ExtensionOption (called by extension() function)
- redid _ExtensionCarrier to function dynamically based on __getattribute__
- added logging to attributes package, indicating the execution of a lazy callable
- going to close [ticket:329]
Mike Bayer [Thu, 19 Oct 2006 07:20:52 +0000 (07:20 +0000)]
- cleanup to the last commit
- added contains_eager() MapperOption, used in conjunction with
instances() to specify properties that should be eagerly loaded
from the result set, using their plain column names by default, or translated
given an custom row-translation function. [ticket:347].
Mike Bayer [Tue, 17 Oct 2006 02:03:00 +0000 (02:03 +0000)]
reorganizing classnames a bit, flagging "private" classes in the sql package,
getting the generated docs to look a little nicer.
fixes to extensions, sqlsoup etc. to be compatible with recent API tweaks
Mike Bayer [Mon, 16 Oct 2006 23:34:23 +0000 (23:34 +0000)]
- added "column_prefix=None" argument to mapper; prepends the
given string (typically '_') to column-based attributes automatically
set up from the mapper's Table
Mike Bayer [Sun, 15 Oct 2006 00:07:06 +0000 (00:07 +0000)]
- ForeignKey(Constraint) supports "use_alter=True", to create/drop a foreign key
via ALTER. this allows circular foreign key relationships to be set up.
Mike Bayer [Sat, 14 Oct 2006 21:58:04 +0000 (21:58 +0000)]
- a fair amount of cleanup to the schema package, removal of ambiguous
methods, methods that are no longer needed. slightly more constrained
useage, greater emphasis on explicitness.
- table_iterator signature fixup, includes fix for [ticket:288]
- the "primary_key" attribute of Table and other selectables becomes
a setlike ColumnCollection object; is no longer ordered or numerically
indexed. a comparison clause between two pks that are derived from the
same underlying tables (i.e. such as two Alias objects) can be generated
via table1.primary_key==table2.primary_key
- append_item() methods removed from Table and Column; preferably
construct Table/Column/related objects inline, but if needed use
append_column(), append_foreign_key(), append_constraint(), etc.
- table.create() no longer returns the Table object, instead has no
return value. the usual case is that tables are created via metadata,
which is preferable since it will handle table dependencies.
- added UniqueConstraint (goes at Table level), CheckConstraint
(goes at Table or Column level) fixes [ticket:217]
- index=False/unique=True on Column now creates a UniqueConstraint,
index=True/unique=False creates a plain Index,
index=True/unique=True on Column creates a unique Index. 'index'
and 'unique' keyword arguments to column are now boolean only; for
explcit names and groupings of indexes or unique constraints, use the
UniqueConstraint/Index constructs explicitly.
- relationship of Metadata/Table/SchemaGenerator/Dropper has been
improved so that the schemavisitor receives the metadata object
for greater control over groupings of creates/drops.
- added "use_alter" argument to ForeignKey, ForeignKeyConstraint,
but it doesnt do anything yet. will utilize new generator/dropper
behavior to implement.
Mike Bayer [Sat, 14 Oct 2006 07:57:12 +0000 (07:57 +0000)]
a simplification to syncrule generation, which also allows more flexible configuration
of which columns are to be involved in the synchronization via foreignkey property.
foreignkey param is a little more important now and should have its role clarified
particularly for self-referential mappers.
Mike Bayer [Fri, 13 Oct 2006 16:38:21 +0000 (16:38 +0000)]
- sync checks destination column for primary key status, will not set it to None in that case
- dependency non-passively loads child items for many-to-one post update check
Mike Bayer [Sun, 8 Oct 2006 19:30:00 +0000 (19:30 +0000)]
- mapper.save_obj() now functions across all mappers in its polymorphic
series, UOWTask calls mapper appropriately in this manner
- polymorphic mappers (i.e. using inheritance) now produces INSERT
statements in order of tables across all inherited classes
[ticket:321]
Mike Bayer [Sun, 8 Oct 2006 02:46:40 +0000 (02:46 +0000)]
- the "foreign_key" attribute on Column and ColumnElement in general
is deprecated, in favor of the "foreign_keys" list/set-based attribute,
which takes into account multiple foreign keys on one column.
"foreign_key" will return the first element in the "foreign_keys" list/set
or None if the list is empty.
- added a user test to the relationships test, testing various new things this
change allows
Mike Bayer [Tue, 3 Oct 2006 23:38:48 +0000 (23:38 +0000)]
- "custom list classes" is now implemented via the "collection_class"
keyword argument to relation(). the old way still works but is
deprecated [ticket:212]
Mike Bayer [Tue, 3 Oct 2006 23:00:04 +0000 (23:00 +0000)]
- Function objects know what to do in a FROM clause now. their
behavior should be the same, except now you can also do things like
select(['*'], from_obj=[func.my_function()]) to get multiple
columns from the result, or even use sql.column() constructs to name the
return columns [ticket:172]. generally only postgres understands the
syntax (and possibly oracle).
Mike Bayer [Tue, 3 Oct 2006 21:47:48 +0000 (21:47 +0000)]
- added auto_setinputsizes=False to oracle dialect. if true, all executions will get setinputsizes called ahead of time.
- some tweaks to the types unittest for oracle. oracle types still need lots more work.
Mike Bayer [Tue, 3 Oct 2006 21:08:14 +0000 (21:08 +0000)]
- removed "extension()" MapperOption
- TypeEngine objects can report on DBAPI types
- added set_input_sizes() to default dialect
- oracle dialect gets Timestamp type added, may need to call
set_input_sizes() to make it work with sub-second resolution [ticket:304]
Mike Bayer [Tue, 3 Oct 2006 16:47:14 +0000 (16:47 +0000)]
- merged loader_strategies branch into trunk.
- this is a wide refactoring to "attribute loader" and "options" architectures.
ColumnProperty and PropertyLoader define their loading behaivor via switchable
"strategies", and MapperOptions no longer use mapper/property copying
in order to function; they are instead propigated via QueryContext
and SelectionContext objects at query/instnaces time.
All of the copying of mappers and properties that was used to handle
inheritance as well as options() has been removed and the structure
of mappers and properties is much simpler and more clearly laid out.