Commit Graph

3323 Commits

Author SHA1 Message Date
Jason Kirtland e203b4dd4e - Converted MAGICCOOKIE=object() to a little symbol implementation to ease object inspection and debugging 2008-02-22 19:03:44 +00:00
Mike Bayer b1c9082c94 er, ok, dont do that (reversed last change). PG relies upon _register_clean for
new PK switch even if no SQL is emitted.
2008-02-21 23:11:30 +00:00
Mike Bayer 6abe14f852 dont treat "listonly" objects as newly clean 2008-02-21 22:12:46 +00:00
Mike Bayer 65da266daa - preventive code against a potential lost-reference
bug in flush()
2008-02-21 21:41:53 +00:00
Mike Bayer 334668d904 - added a new "higher level" operator called "of_type()" -
used in join() as well as with any() and has(), qualifies
the subclass which will be used in filter criterion,
e.g.:

query.filter(Company.employees.of_type(Engineer).
  any(Engineer.name=='foo')),

query.join(Company.employees.of_type(Engineer)).
  filter(Engineer.name=='foo')
2008-02-21 01:01:24 +00:00
Mike Bayer f827e3c0b7 - fixed potential generative bug when the same Query was
used to generate multiple Query objects using join().
2008-02-20 17:09:25 +00:00
Mike Bayer 7f43bc55e0 - can again create aliases of selects against textual
FROM clauses, [ticket:975]
2008-02-19 23:46:14 +00:00
Mike Bayer 3e6e61dbe7 - modernized cascade.py tests
- your cries have been heard:  removing a pending item
from an attribute or collection with delete-orphan
expunges the item from the session; no FlushError is raised.
Note that if you session.save()'ed the pending item
explicitly, the attribute/collection removal still knocks
it out.
2008-02-17 18:13:14 +00:00
Mike Bayer 1aebdb231f get basic compilation working for [ticket:972] 2008-02-17 15:35:30 +00:00
Mike Bayer a3f67fecb2 - any(), has(), contains(), attribute level == and != now
work properly with self-referential relations - the clause
inside the EXISTS is aliased on the "remote" side to
distinguish it from the parent table.
2008-02-17 01:15:43 +00:00
Mike Bayer 191dbee5c8 - remove some old cruft
- deprecate ancient engine_descriptors() method
2008-02-16 06:07:28 +00:00
Jason Kirtland 29e456d51c Bump. 2008-02-15 16:54:42 +00:00
Mike Bayer 14b3a913ac fixing recent schema.py changes to work with oracle 'owner' attribute rel_0_4_3 2008-02-14 23:41:17 +00:00
Jason Kirtland 911c1ec513 - comment typo 2008-02-14 22:42:53 +00:00
Jason Kirtland 90e3532d0c - Made testlib's --unhashable and r3935's set changes play nice
- A bonus overhead reduction for IdentitySet instances
2008-02-14 22:39:42 +00:00
Jason Kirtland bd27fb07d4 - Corrected __eq__ pragma drift. 2008-02-14 22:07:58 +00:00
Jason Kirtland c055143ba9 Restore 2.3 compat for the sharding test 2008-02-14 21:47:01 +00:00
Mike Bayer 14542f4c07 fixed (still uncovered) incorrect variable name... 2008-02-14 20:07:38 +00:00
Jason Kirtland 71e745e96b - Fixed a couple pyflakes, cleaned up imports & whitespace 2008-02-14 20:02:10 +00:00
Rick Morrison 8dd5eb402e MSSQL now compiles func.now() to CURRENT_TIMESTAMP 2008-02-14 18:38:24 +00:00
Mike Bayer 84485fb7bb - fixed bug in result proxy where anonymously generated
column labels would not be accessible using their straight
string name
2008-02-14 18:22:47 +00:00
Rick Morrison eddae08fdf Added EXEC to MSSQL _is_select regexp; should now detect row-returning stored procedures
Added experimental implementation of limit/offset using row_number()
2008-02-14 18:03:57 +00:00
Mike Bayer a612c8a5e2 a TODO comment 2008-02-13 17:27:47 +00:00
Jason Kirtland 3b23d1d6d6 0.4.3 edits 2008-02-12 21:27:18 +00:00
Mike Bayer 9fffa2c7e1 - fixed bug introduced in r4070 where union() and other compound selects would not get
an OID column if it only contained one selectable element, due to missing return in _proxy_column()
- visit_column() calls itself to render a primary key col being used as the interpretation of the oid col instead of relying upon broken partial logic
2008-02-12 21:16:31 +00:00
Mike Bayer 85e8cb7ffb add pk cols to assocaition table 2008-02-12 16:45:39 +00:00
Jason Kirtland adc929c0f1 - Added two new vertical dict mapping examples. 2008-02-12 01:44:20 +00:00
Mike Bayer 6f9aa3a900 - added expire_all() method to Session. Calls expire()
for all persistent instances.  This is handy in conjunction
with .....

- instances which have been partially or fully expired
will have their expired attributes populated during a regular
Query operation which affects those objects, preventing
a needless second SQL statement for each instance.
2008-02-11 19:22:34 +00:00
Jason Kirtland 645fa5255d - Fixed .get(<int>) of a String PK (exposed by pg 8.3) 2008-02-11 19:14:38 +00:00
Mike Bayer c0b5a0446b - updated the naming scheme of the base test classes in test/testlib/testing.py;
tests extend from either TestBase or ORMTest, using additional mixins for
special assertion methods as needed
2008-02-11 00:28:39 +00:00
Mike Bayer 90c572b513 - Table columns and constraints can be overridden on a
an existing table (such as a table that was already
reflected) using the 'useexisting=True' flag, which now
takes into account the arguments passed along with it.
- fixed one element of [ticket:910]
- refactored reflection test
2008-02-10 23:39:09 +00:00
Jason Kirtland 1ddf4af355 - Better error messaging on failed collection bulk-assignments 2008-02-09 19:15:45 +00:00
Jason Kirtland 7313f5c714 - Note about future CollectionAttributeImp.collection_intrface removal + whitespace cleanup. 2008-02-09 18:45:50 +00:00
Jason Kirtland 2269bee87f - Determine the basic collection interface dynamically when adapting a collection to an interable 2008-02-09 18:45:11 +00:00
Mike Bayer 3ab7149e25 added info on foreign_keys attribute 2008-02-09 17:26:48 +00:00
Mike Bayer 1a3dc51993 - lazy loader can now handle a join condition where the "bound"
column (i.e. the one that gets the parent id sent as a bind
parameter) appears more than once in the join condition.
Specifically this allows the common task of a relation()
which contains a parent-correlated subquery, such as "select
only the most recent child item". [ticket:946]
- col_is_part_of_mappings made more strict, seems to be OK
with tests
- memusage will dump out the size list in an assertion fail
2008-02-09 01:48:19 +00:00
Mike Bayer 0b890e1ccd heisenbug in aisle 3
(when db.dispose is called in unitofwork test with sqlite, the first test that runs in memusage grows by two gc'ed objects on every iteration; then the problem vanishes.  doesnt matter what test runs in memusage.  doing a dispose() in memusage solves the problem also.  screwing wiht the mechanics of engine.dispose() only fix it when both the pool.dispose() *and* the pool.ressurect() are disabled.  its just a subtle python/pysqlite bug afaict)
2008-02-09 01:24:01 +00:00
Mike Bayer 842934f40c - added generative where(<criterion>) method to delete()
and update() constructs which return a new object with
criterion joined to existing criterion via AND, just
like select().where().
- compile assertions use assertEquals()
2008-02-08 22:57:45 +00:00
Jason Kirtland 1b228e8481 - Added deferrability support to constraints 2008-02-08 20:50:33 +00:00
Jason Kirtland 426b6d9baf - psycopg2 can raise un-str()able exceptions; don't croak when trying to log them 2008-02-08 20:38:28 +00:00
Paul Johnston 21c2976870 Fix: deletes with schemas on MSSQL 2000 [ticket:967] 2008-02-08 16:48:37 +00:00
Mike Bayer 2999ea9554 test for session close efficiency 2008-02-08 15:45:54 +00:00
Paul Johnston 5049242f3b Fix some mssql unit tests 2008-02-08 13:45:19 +00:00
Paul Johnston 7e6cd582ca Strip schema from access tables 2008-02-08 12:05:28 +00:00
Lele Gaifax 668a8ae21b Avoid using common keywords as field names: the test executes literal selects 2008-02-06 17:52:48 +00:00
Mike Bayer 6e498f1a21 check for unicode first before encoding 2008-02-06 17:44:48 +00:00
Ants Aasma 4506425966 unit-of-work flush didn't close the failed transaction when the session was not in a transaction and commiting the transaction failed. 2008-02-06 17:38:29 +00:00
Jason Kirtland 56410e3158 - Some more reST docstring corrections 2008-02-06 01:40:40 +00:00
Jason Kirtland 9bc19046d1 - clean up the print version of the docs a bit [ticket:745] 2008-02-06 01:32:33 +00:00
Jason Kirtland b0991bf661 - A few quick docstring typo fixes, including [ticket:766] 2008-02-06 01:09:08 +00:00