Commit Graph

4016 Commits

Author SHA1 Message Date
Mike Bayer e6141ef8ae formatting 2008-11-07 18:03:37 +00:00
Mike Bayer da59591a9c - zoomark adjustments
- changelog has separate category for 'features'
2008-11-07 17:45:19 +00:00
Mike Bayer 17b758faed avoid some often unnecessary method calls. i think we might have squeezed all we're going to squeeze out of compiler at this point. 2008-11-07 17:08:23 +00:00
Mike Bayer abf9bef1a9 the @memoized_property fairy pays a visit 2008-11-07 16:41:54 +00:00
Mike Bayer 8a04f99784 - Repaired the table.tometadata() method so that a passed-in
schema argument is propigated to ForeignKey constructs.
2008-11-07 16:19:24 +00:00
Mike Bayer c3352e5542 - Fixed bug in Query involving order_by() in conjunction with
multiple aliases of the same class (will add tests in
[ticket:1218])
- Added a new extension sqlalchemy.ext.serializer.  Provides
Serializer/Deserializer "classes" which mirror Pickle/Unpickle,
as well as dumps() and loads().  This serializer implements
an "external object" pickler which keeps key context-sensitive
objects, including engines, sessions, metadata, Tables/Columns,
and mappers, outside of the pickle stream, and can later
restore the pickle using any engine/metadata/session provider.
This is used not for pickling regular object instances, which are
pickleable without any special logic, but for pickling expression
objects and full Query objects, such that all mapper/engine/session
dependencies can be restored at unpickle time.
2008-11-06 23:07:47 +00:00
Martijn Faassen 84003a8d40 add two new hooks for bulk operations to SessionExtension:
* after_bulk_delete

* after_bulk_update
2008-11-06 06:12:11 +00:00
Mike Bayer 7576315169 - Fixed bug in composite types which prevented a primary-key
composite type from being mutated [ticket:1213].
2008-11-05 21:15:19 +00:00
Mike Bayer 9f894d2f26 - Dialects can now generate label names of adjustable length.
Pass in the argument "label_length=<value>" to create_engine()
to adjust how many characters max will be present in dynamically
generated column labels, i.e. "somecolumn AS somelabel".  Any
value less than 6 will result in a label of minimal size,
consiting of an underscore and a numeric counter.
The compiler uses the value of dialect.max_identifier_length
as a default. [ticket:1211]
- removed ANON_NAME regular expression, using string patterns now
- _generated_label() unicode subclass is used to indicate generated names
which are subject to truncation
2008-11-05 20:50:48 +00:00
Jason Kirtland 89b86f41bb Tiny fix to test setup logic. 2008-11-04 18:29:33 +00:00
Mike Bayer c38e5d043f - Simplified the check for ResultProxy "autoclose without results"
to be based solely on presence of cursor.description.
All the regexp-based guessing about statements returning rows
has been removed [ticket:1212].
2008-11-04 17:28:26 +00:00
Mike Bayer 3f1e5e213d - added 'EXPLAIN' to the list of 'returns rows', but this
issue will be addressed more fully by [ticket:1212].
2008-11-04 13:18:13 +00:00
Jason Kirtland 89a28cffa9 Added a label for pg. 2008-11-03 04:41:06 +00:00
Mike Bayer 47d2576365 - Fixed bug when using multiple query.join() with an aliased-bound
descriptor which would lose the left alias.
2008-11-03 03:37:44 +00:00
Mike Bayer a5dfbeedb9 - Improved the behavior of aliased() objects such that they more
accurately adapt the expressions generated, which helps
particularly with self-referential comparisons. [ticket:1171]

- Fixed bug involving primaryjoin/secondaryjoin conditions
constructed from class-bound attributes (as often occurs
when using declarative), which later would be inappropriately
aliased by Query, particularly with the various EXISTS
based comparators.
2008-11-03 02:52:30 +00:00
Mike Bayer 334d5118bb update call count 2008-11-03 01:47:30 +00:00
Jason Kirtland 27b48aa7e6 Added tests for Query.scalar(), .value() [ticket:1163] 2008-11-03 00:09:33 +00:00
Jason Kirtland 837f71eca5 Fixed assoc proxy examples [ticket:1191] 2008-11-02 22:50:12 +00:00
Mike Bayer 50719c0bb0 revert r5220 inadvertently committed to trunk 2008-11-02 22:11:40 +00:00
Mike Bayer ff2f799ba3 progress so far 2008-11-02 22:08:24 +00:00
Michael Trier ea2e7fd365 Corrected some ordering issues with tests. 2008-11-02 17:42:53 +00:00
Mike Bayer be811d23fa - mapper naming/organization cleanup
- gave into peer pressure and removed all __names
- inlined polymorphic_iterator()
- moved methods into categories based on configuration, inspection, persistence, row processing.
a more extreme change would be to make separate mixin classes for these or similar.
2008-11-02 17:10:37 +00:00
Mike Bayer 9562ab8398 pep8 stuff 2008-11-02 15:50:16 +00:00
Mike Bayer ed3e3f2571 - util.flatten_iterator() func doesn't interpret strings with
__iter__() methods as iterators, such as in pypy [ticket:1077].
2008-10-31 21:44:34 +00:00
Mike Bayer bba54e320d the recent change to garbage collection of InstanceState meant that
the deferred lambda: created by lazy_clause would get a state with
no dict.  creates strong reference to the object now.
2008-10-30 14:40:10 +00:00
Michael Trier c2a6ebb96e Added documentation for the MetaData.sorted_tables() method. 2008-10-29 17:43:06 +00:00
Michael Trier 7a0a7af923 Corrected method documentation for MetaData.drop_all(). 2008-10-29 17:31:14 +00:00
Jonathan Ellis 3882bb864b allow repr to leave stuff as unicode. I can't think of any reason for the old behavior except that I didn't understand unicode when I wrote it. Not that I claim to fully understand it now. fixes #1136 2008-10-29 00:48:33 +00:00
Jason Kirtland 554f223f6b Accept USING as a prefix or postfix modifer when reflecting keys. [ticket:1117] 2008-10-28 21:32:24 +00:00
Michael Trier 231839e037 Corrects an import error when using echo_uow. Fixes #1205. 2008-10-28 21:10:31 +00:00
Jonathan Ellis 199257d7fb fix #821 2008-10-28 20:25:25 +00:00
Mike Bayer 0719e6f648 - added some abstraction to the attributes.History object
- Repaired support for "passive-deletes" on a many-to-one
relation() with "delete" cascade. [ticket:1183]
2008-10-28 20:15:26 +00:00
Michael Trier 0fc32d7825 Updated UOWEventHandler so that it uses session.add() instead of session.save_or_update(). Fixes #1208. 2008-10-28 19:59:53 +00:00
Michael Trier aa6c4df395 Corrected typo in Types docs. 2008-10-28 18:09:22 +00:00
Michael Trier d4dcb2e217 Mysql no longer expects include_columns to be specified in lowercase. Fixes #1206. 2008-10-28 16:48:13 +00:00
Jason Kirtland c9591657dd Fixed mysql FK reflection for the edge case where a Table has expicitly provided a schema= that matches the connection's default schema. 2008-10-27 22:56:53 +00:00
Jonathan Ellis d56c1f1663 r/m wildcard imports. fixes #1195 2008-10-27 19:49:49 +00:00
Mike Bayer c36271e23b - InstanceState object now removes circular references to
itself upon disposal to keep it outside of cyclic garbage
collection.
2008-10-26 20:02:19 +00:00
Mike Bayer 76e8175971 - moved _FigureVisitName into visitiors.VisitorType, added Visitor base class to reduce dependencies
- implemented _generative decorator for select/update/insert/delete constructs
- other minutiae
2008-10-25 19:44:21 +00:00
Mike Bayer 25e5157785 call drop # 2 2008-10-25 18:24:13 +00:00
Mike Bayer 9160ce0d45 call drop 2008-10-25 18:23:46 +00:00
Mike Bayer e82eebb368 - When using Query.join() with an explicit clause for the
ON clause, the clause will be aliased in terms of the left
side of the join, allowing scenarios like query(Source).
from_self().join((Dest, Source.id==Dest.source_id)) to work
properly.
2008-10-25 18:04:59 +00:00
Mike Bayer af1bb6b955 small fix 2008-10-25 18:00:37 +00:00
Mike Bayer f7a00f30d5 a couple of refinements 2008-10-25 17:19:15 +00:00
Mike Bayer baa9006c28 remove erroneous comments 2008-10-24 19:43:29 +00:00
Mike Bayer eba763b258 two more cache examples 2008-10-24 19:41:25 +00:00
Mike Bayer ecf22b390b auto_convert_lobs=False honored by OracleBinary, OracleText types
[ticket:1178]
2008-10-24 17:09:58 +00:00
Mike Bayer 3bbf8037f8 - fixed some oracle unit tests in test/sql/
- wrote a docstring for oracle dialect, needs formatting perhaps
- made FIRST_ROWS optimization optional based on optimize_limits=True, [ticket:536]
2008-10-24 15:58:17 +00:00
Mike Bayer 4ba4964425 2.4 callcounts of course go up for no apparent reason 2008-10-23 02:39:52 +00:00
Mike Bayer 99cd1346fb - CompileTests run without the DBAPI being used
- added stack logic back to visit_compound(), pared down is_subquery
2008-10-23 02:35:08 +00:00