Commit Graph

976 Commits

Author SHA1 Message Date
Mike Bayer b8b51fe437 - sessionmaker module is out, replaced with simple function in session.py
- scoping/class instrumenting behavior of sessionmaker moved into new scoping module
which implements scoped_session() (subject to potential name change)
- SessionContext / assignmapper are deprecated, replaced with scoped_session()
2007-08-02 05:42:49 +00:00
Mike Bayer 9f23ec7423 - added inline UPDATE/INSERT clauses, settable as regular object attributes.
the clause gets executed inline during a flush().
2007-08-02 04:24:02 +00:00
Mike Bayer 14a0c29362 added values() generative method to Insert/Update 2007-08-02 03:13:02 +00:00
Mike Bayer 11b294d1d2 - used a metaclass trick to get Session.bind / Session.<someprop> to work 2007-08-02 01:18:42 +00:00
Mike Bayer 23140c926b -merged 0.3 pool threadlocal fix from r3139 2007-08-02 00:02:16 +00:00
Mike Bayer f75faa7cb4 - SessionContext and assignmapper are deprecated
- Session function is removed
- all replaced with new sessionmaker() function.  description at:
http://www.sqlalchemy.org/trac/wiki/WhatsNewIn04#create_sessionSessionContextassignmapperDeprecated
2007-08-01 20:52:26 +00:00
Jason Kirtland f8ebf35deb Make {include,exclude}_properties membership tests ignore column_prefix 2007-08-01 15:33:55 +00:00
Jason Kirtland 18dab5baf0 Added EXT_CONTINUE and EXT_STOP for MapperExtensions; EXT_PASS is a synonym for EXT_CONTINUE.
Repointed docs and examples to EXT_CONTINUE
2007-08-01 07:18:50 +00:00
Jason Kirtland cd2176d48d It's now possible to map only a subset of available selectable columns onto mapper properties [ticket:696]. 2007-08-01 01:44:24 +00:00
Jason Kirtland aac6598ecc Changed __colset__ to __composite_values__ [ticket:692] (sort of) 2007-07-31 23:50:50 +00:00
Mike Bayer 4ae0ee3022 - commented out auto-rollback of attributes for now, added [ticket:705] with the recipe
- added "drop_all()" at the start of all unittest runs; see if that helps some of the carwrecks we have
2007-07-31 22:54:07 +00:00
Mike Bayer 8f17efd7a3 - assurances that context.connection is safe to use by column default functions, helps proposal for [ticket:703] 2007-07-31 17:15:36 +00:00
Jason Kirtland 04e8a839b4 MetaData can now reflect() all tables in the database en-masse thanks to table_names().
table_names changed to accept an explicit connection
ThreadLocalMetaData constructor now takes no arguments. If case_sensitive is needed in a multi-bind context, move it to Table or subclass TLMD to force it.
Banished **kwargs from MetaData
Lots of class doc and docstring improvements around MetaData and TLMD.
Some engine->bind internal naming updates + reorg in schema.
MySQL table_names now return Unicode. (Also, a unicode reflect() unit test is needed.)
2007-07-31 00:19:23 +00:00
Jonathan Ellis 47406ca924 test for table_names 2007-07-30 19:14:08 +00:00
Mike Bayer cf633e2975 - added Session constructor which turns autoflush/transactional on
- Session is used by unitofwork unit test now as well as session.py tests
- fixes to table/schema reflection broken last night
- doc updates
- other unittest fixes
2007-07-29 20:30:32 +00:00
Mike Bayer f94d9efecc - removed import of old sqlite module [ticket:654]
- removed sqlite version warning, all tests pass 100% with py2.5's older sqlite lib
- fixed dynamic test for py2.5
2007-07-29 17:39:37 +00:00
Jason Kirtland 6a1d279a9a Big MySQL dialect update, mostly efficiency and style.
Added TINYINT [ticket:691]- whoa, how did that one go missing for so long?
Added a charset-fixing pool listener. The driver-level option doesn't help everyone with this one.
New reflector code not quite done and omiited from this commit.
2007-07-29 16:13:23 +00:00
Mike Bayer 9b1ccb29d4 clearer error for ForeignKey cant locate parent table, [ticket:565] 2007-07-29 02:26:42 +00:00
Mike Bayer 45650694ee fixed pydoc bug in [ticket:564] 2007-07-29 02:13:29 +00:00
Mike Bayer 82515ea2fc -fixed [ticket:555]
- fixed attribute glitch breaking the build
2007-07-29 01:16:01 +00:00
Mike Bayer 33fa7019fb - removed auto_close_cursors and disallow_open_cursors arguments from Pool;
reduces overhead as cursors are normally closed by ResultProxy and Connection.
2007-07-29 00:42:49 +00:00
Jason Kirtland 9f10023179 Added pool hooks for connection creation, check out and check in. 2007-07-28 19:51:55 +00:00
Mike Bayer c23320f09a - trimming down redundancy in lazyloader code
- fixups to ORM test fixture code
- fixup to dynamic realtions, test for autoflush session, delete-orphan
- made new dynamic_loader() function to create them
- removed old hasparent() call on AttributeHistory
2007-07-28 05:16:03 +00:00
Jason Kirtland e9155b6138 Got basic backrefs going with dynamic attributes 2007-07-28 00:33:59 +00:00
Mike Bayer 3f1c33cdc7 - an experimental feature that combines a Query with an InstrumentedAttribute, to provide
"always live" results in conjunction with mutator capability
2007-07-27 23:02:20 +00:00
Jason Kirtland f02aab451c Added some collections slicing tests that somehow escaped the r3040 commit. 2007-07-27 22:40:38 +00:00
Mike Bayer 34360bff78 added distinct positional dictionary arg to query.params(), fixes [ticket:690] 2007-07-27 21:10:12 +00:00
Jason Kirtland a4169b03b3 Fix testing. Really. 2007-07-27 20:27:20 +00:00
Jason Kirtland e9f51b2456 Fix coverage again- try really hard not to load anything from lib/ until after the coverage hook runs. 2007-07-27 20:21:36 +00:00
Mike Bayer 2f8ebfef1d - clarified LoaderStrategy implementations, centralized deferred column loading
into DeferredColumnLoader (i.e. deferred polymorphic loader)
- added generic deferred_load(instance, props) method, will set up "deferred" or "lazy"
loads across a set of properties.
- mapper post-fetch now uses all deferreds, no more post-selects inside a flush() [ticket:652]
2007-07-27 18:57:02 +00:00
Mike Bayer 8db97dad98 fixed glitch in Select visit traversal, fixes #693 2007-07-27 16:46:11 +00:00
Mike Bayer 2dd8c4e7b6 added an order by attempting to get buildbot 100% 2007-07-27 05:07:05 +00:00
Mike Bayer 5b7363c338 - merged ants' derived attributes example from 0.4 branch
- disabled PG schema test for now (want to see the buildbot succeed)
2007-07-27 04:12:07 +00:00
Mike Bayer ed4fc64bb0 merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to maintenance branch in branches/rel_0_3. 2007-07-27 04:08:53 +00:00
Mike Bayer 3a8e235af6 - added a check for joining from A->B using join(), along two
different m2m tables.  this raises an error in 0.3 but is
      possible in 0.4 when aliases are used. [ticket:687]
2007-07-26 18:25:50 +00:00
Rick Morrison 1c66e35132 mssql: added support for TIME type (simulated via DATETIME col) [ticket:679] 2007-07-26 16:51:09 +00:00
Mike Bayer bdf8f4ca80 postgres cant do this particular test b.c. the default "public" schema is taken
as a blank "schema" argument on Table
2007-07-20 21:01:51 +00:00
Mike Bayer 9aa1b946ed hopefully resolved all the PG deadlocks occuring here 2007-07-20 20:22:35 +00:00
Jason Kirtland 834c0e9056 Merged lower case caching, fetching from r2955
Be sure to close rows fetched in reflection (if not autoclosed)
Fixed bind test, needed transactional storage engine for mysql
2007-07-20 19:43:46 +00:00
Mike Bayer c1bf74462f assert timeout is 3 seconds, not 2 2007-07-20 15:41:42 +00:00
Mike Bayer 687d9342e6 - a new mutex that was added in 0.3.9 causes the pool_timeout
feature to fail during a race condition; threads would
raise TimeoutError immediately with no delay if many threads
push the pool into overflow at the same time.  this issue has been
fixed.
2007-07-20 15:10:56 +00:00
Jason Kirtland 7fed906a9b Better quoting of identifiers when manipulating schemas
Merged from r2981
2007-07-19 20:44:19 +00:00
Mike Bayer 7f3bb10cb6 - merged some more of the SessionTransaction connection-bound checks from 0.4
- _BinaryExpression.compare() checks for a base set of "commutative" operators and checks for itself in reverse if so
- added ORM-based unit test for the above, fixes [ticket:664]
2007-07-18 18:51:35 +00:00
Mike Bayer 68f706b5ba - foreign key specs can have any chararcter in their identifiers
[ticket:667]
2007-07-18 18:32:48 +00:00
Paul Johnston a966505992 Properly escape table names when reflecting for mssql and sqlite [ticket:653] 2007-07-17 20:13:36 +00:00
Jason Kirtland 23d0188749 - Added basic schema reflection coverage to main tests
- Fix stupid mysql typo (#662)
- Merged mysql osx/multibyte has_table from 0.4 (r2943)
2007-07-17 13:21:46 +00:00
Mike Bayer a3f25674fc - fixes for connection bound sessions, connection-bound compiled objects via metadata 2007-07-16 21:29:27 +00:00
Mike Bayer 8cb8daaafe - fixed "ambiguous column" result detection, when dupe col names exist
in a result [ticket:657]
2007-07-15 15:40:09 +00:00
Mike Bayer 471c3f8102 updated interval type for [ticket:595] 2007-07-15 15:29:41 +00:00
Mike Bayer 5804e82215 - added friendlier error checking for query.get() with too-short pk
- more docs
2007-07-15 15:11:05 +00:00