Commit Graph

5242 Commits

Author SHA1 Message Date
Mike Bayer 16b8f5f5b0 - fixed bug where eagerload() (nor lazyload()) option didn't properly
instruct the Query whether or not to use "nesting" when producing a
LIMIT query.
2006-10-31 20:40:22 +00:00
Mike Bayer f60151ebd3 - fixed direct execution of Compiled objects 2006-10-31 15:58:51 +00:00
Mike Bayer 9bb80a8f11 figured out how a Select can be in its own _froms list, changed assertion to just a continue 2006-10-31 00:51:16 +00:00
Mike Bayer 76597e533f fixed binary types test to use two binary files specifically for testing, instead of
attempting to grab .pyc files
2006-10-30 01:29:43 +00:00
Mike Bayer 4273dd4cfe further fixes to sqlite booleans, weren't working as defaults 2006-10-29 02:40:27 +00:00
Mike Bayer d231088323 added system return code to base runtest 2006-10-27 03:53:39 +00:00
Mike Bayer 6e565f7231 - some new Pool utility classes, updated docs
- "use_threadlocal" on Pool defaults to False (same as create_engine)
2006-10-24 21:32:13 +00:00
Mike Bayer 87cda86f34 - eager query generation adjustment, [ticket:355] 2006-10-24 14:08:11 +00:00
Mike Bayer 749ac647d7 integrated coverage.py into unittest suite 2006-10-23 01:26:24 +00:00
Mike Bayer 0be0131a44 fixed some imports, transaction hanging open 2006-10-22 19:10:44 +00:00
Mike Bayer 066d8dc79c added string length to avoid LOB col type in oracle 2006-10-22 05:50:03 +00:00
Mike Bayer a610264fe9 updating the cycles test 2006-10-22 05:45:43 +00:00
Mike Bayer fe27b87023 updates to oracle
added more ordering to schema collections for better predictability
2006-10-22 05:02:11 +00:00
Mike Bayer 45b6c7d778 added __getattr__() proxy to TypeDecorator 2006-10-22 00:42:43 +00:00
Mike Bayer bc240be3f8 - 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]
2006-10-22 00:24:26 +00:00
Mike Bayer 97feb4dbee - docstring on polymorphic_mapping
- applied Simon Wittber's ActiveMapper version_id_col patch for [ticket:348]
2006-10-21 23:15:13 +00:00
Mike Bayer c9dc3a334e re-implemented extension option 2006-10-21 23:04:36 +00:00
Mike Bayer 892a1ebcb8 fixed pg reflection of timezones 2006-10-20 20:49:16 +00:00
Mike Bayer 9d146d7e64 dev 2006-10-20 15:38:31 +00:00
Mike Bayer a941dff48f fix for sqlite refection of names with weird quotes around them in the DDL which seem to hang around 2006-10-19 23:01:14 +00:00
Mike Bayer 6a38b502e0 - 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].
2006-10-19 07:20:52 +00:00
Mike Bayer 2bef6699d3 progress on [ticket:329] 2006-10-19 07:02:04 +00:00
Mike Bayer 0d75e5961c - [ticket:346], session closing the connection on flush
- added unicode assertion for sqlite
2006-10-19 02:52:31 +00:00
Mike Bayer 4d2be119f0 synonym does not create the proxying behavior unless the flag 'proxy=True' is set up 2006-10-17 18:11:21 +00:00
Mike Bayer 9e74371d53 restored "synonym" property 2006-10-17 18:05:32 +00:00
Mike Bayer 180d374199 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
2006-10-17 02:03:00 +00:00
Mike Bayer 506b594f52 - added "column_prefix=None" argument to mapper; prepends the
given string (typically '_') to column-based attributes automatically
set up from the mapper's Table
2006-10-16 23:34:23 +00:00
Mike Bayer 3bb71bdd2d strings and unicodes are compared via == rather than 'is'.
TypeDecorator uses underlying impl for mutator/comparison functions by default
2006-10-16 17:20:15 +00:00
Mike Bayer 819ef543b3 de-cruftification 2006-10-16 00:37:53 +00:00
Mike Bayer 7e5e985c0e - ForeignKey(Constraint) supports "use_alter=True", to create/drop a foreign key
via ALTER.  this allows circular foreign key relationships to be set up.
2006-10-15 00:07:06 +00:00
Mike Bayer 8340006dd7 - 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.
2006-10-14 21:58:04 +00:00
Mike Bayer 5bb47440e0 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.
2006-10-14 07:57:12 +00:00
Mike Bayer e16bfad407 - fixes to Date/Time (SLDate/SLTime) types; works as good as postgres
now [ticket:335]
2006-10-12 01:12:17 +00:00
Mike Bayer ef77cfa61b - 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]
2006-10-08 19:30:00 +00:00
Mike Bayer b0ffcbc264 more fixup to self referential composite primary key mappings 2006-10-08 03:16:38 +00:00
Mike Bayer 8aa6a24fbb this test works better with session clears in between 2006-10-08 02:51:30 +00:00
Mike Bayer 51f16d1498 - 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
2006-10-08 02:46:40 +00:00
Mike Bayer 758828ed54 assorted firebird fixes from Lele Gaifax 2006-10-07 00:54:14 +00:00
Mike Bayer bbd7c66056 - 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).
2006-10-03 23:00:04 +00:00
Mike Bayer ec6d7b3900 formatting fixup, etc. 2006-10-03 22:56:54 +00:00
Mike Bayer 73f145dc0e - 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.
2006-10-03 21:47:48 +00:00
Mike Bayer beff0e1e13 - 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.
2006-10-03 16:47:14 +00:00
Mike Bayer 7a2194e6c0 - added profiling to massave
- adjusted the formatting for per-instance loggers to limit the number
of loggers that get created in memory.
2006-10-01 23:15:53 +00:00
Mike Bayer 8a1706b494 - fixed condition that occurred during reflection when a primary key
column was explciitly overridden, where the PrimaryKeyConstraint would
    get both the reflected and the programmatic column doubled up
2006-09-30 16:26:52 +00:00
Mike Bayer 56e04db226 mass saver for profiling mem usage.... 2006-09-29 20:50:13 +00:00
Mike Bayer aa83929317 [ticket:309] 2006-09-29 20:41:37 +00:00
Mike Bayer a7644ef885 tweaks for mysql 2006-09-29 20:28:43 +00:00
Mike Bayer 7a6e671199 - more adjustments to the eager load table finder to work with existing mappings
against selects and query-created limit/offset subselects
- added eagertest3 to orm/alltests.py
2006-09-28 05:26:26 +00:00
Mike Bayer 35fe9f7b58 the new eagerloading test suite mentioned in the previous commit 2006-09-28 04:54:52 +00:00
Mike Bayer 93caa5da2e decruftify 2006-09-28 02:13:37 +00:00