Commit Graph

5265 Commits

Author SHA1 Message Date
Mike Bayer 9df8afc600 - cleanup, factoring, had some heisenbugs. more test coverage
will be needed overall as missing dependency rules lead
to subtle bugs pretty easily
2010-04-06 01:23:54 -04:00
Mike Bayer 4071156acd all tests pass with this version 2010-04-05 23:21:02 -04:00
Mike Bayer c01d35f15d beginning to get post_update working, will need more tests 2010-04-05 21:29:51 -04:00
Mike Bayer 8ee0590270 breakthrough, wow 2010-04-05 18:48:57 -04:00
Mike Bayer 55382b4dea so here is kind of the idea. but it doesn't work like it used to.
so I think I want to try to build a smarter "find everything without a dependency"
system that is more inline with how this is running now anyway - i.e.
go through the whole list, find nodes with no dependencies.  maybe the
original topological.sort() can do that, not sure.
2010-04-05 17:49:58 -04:00
Mike Bayer f288339e95 looks like most of the issues are because we're losing insert ordering
on cycles.  so lets reintroduce the organize as tree component, which
works here.   still need to make it meaningful by teaching the save/delete state
actions to receive a set of items to match up
2010-04-05 17:24:00 -04:00
Mike Bayer e0e60a6c94 - many-to-many is up.
- now running on the full suite of tests.   unsurprisingly, it appears
there are subtle self-referential issues causing many tests to fail.
2010-04-05 16:52:56 -04:00
Mike Bayer 49489ff21a better assertions, the concern is that an object will change state and not have been
appropriately preprocessed
2010-04-05 16:13:51 -04:00
Mike Bayer 233756a018 these are some assertions that would make things easier, if they can be maintained.
otherwise, if listonly can go from True to False, then there's the whole cascades issue
to deal with, same for delete moving from False to True and vice versa.
2010-04-05 14:53:19 -04:00
Mike Bayer 67b99a7bfa - enabled the DetectKeySwitch, and additionally added that it need
not execute at all when a one-to-many is present on the reverse side.
- OneToMany can establish a state as "listonly" when passive_updates are enabled
and the change is due to key switch.
2010-04-05 14:49:35 -04:00
Mike Bayer ddb40afc6b branch merge 2010-04-05 13:48:52 -04:00
Mike Bayer cfdc41c75c better yet 2010-04-05 13:16:29 -04:00
Mike Bayer cfe330a32a clarify intent and reduce lookups here 2010-04-05 13:09:24 -04:00
Mike Bayer 23a49e346b - further reduce what topological has to do, expects full list of nodes
- fix some side-effect-dependent behaviors in uow.  we can now
unconditionally remove "disabled" actions without rewriting
2010-04-04 12:24:01 -04:00
Mike Bayer f3fff5bdeb this fully moves the per_state methods to work with all states at once 2010-04-04 11:29:41 -04:00
Mike Bayer 9916c0412e moving the per-states operations to be aggreagted on the endpoints to reduce
procesing overhead.
2010-04-04 11:08:00 -04:00
Mike Bayer f05b5b0bda merge default branch 2010-04-04 10:38:29 -04:00
Mike Bayer dbc582a43f - apparently [ticket:1761] was covered in tests already.
- Usage of version_id_col on a backend that supports
cursor.rowcount for execute() but not executemany() now works
when a delete is issued (already worked for saves, since those
don't use executemany()). For a backend that doesn't support
cursor.rowcount at all, a warning is emitted the same
as with saves.  [ticket:1761]
2010-04-04 10:18:16 -04:00
Mike Bayer dfab13e9ae cleanup and callcount reduction in mapper._save_obj, _delete_obj.
includes an untested fix for [ticket:1761]
2010-04-03 21:42:41 -04:00
Mike Bayer 3d3095497b row switch works for post-cycle sorts too...just needed more data in the deps. the pattern here
is more data needed for each tweak.
2010-04-03 19:41:56 -04:00
Mike Bayer 85156a0fbe got row switch more or less up 2010-04-03 18:24:04 -04:00
Mike Bayer ad8ad86470 tweak how we indicate child deleted here 2010-04-03 18:08:48 -04:00
Mike Bayer e5c64845f0 o2m/m2o pretty much there, minus post update. 2010-04-03 18:05:33 -04:00
Mike Bayer 67caec4e17 - basic inheritance behavior
- we do need dependencies between an object and its dep when the other object
has no save or delete pending. the other object
like before isn't needed, but right now we make the dependency just 'None',
and it gets thrown away.
2010-04-03 17:03:12 -04:00
Mike Bayer eefdbd3757 - Now using cx_oracle output converters so that the
DBAPI returns natively the kinds of values we prefer:
- NUMBER values with positive precision + scale convert
to cx_oracle.STRING and then to Decimal.   This
allows perfect precision for the Numeric type when
using cx_oracle.  [ticket:1759]
- STRING/FIXED_CHAR now convert to unicode natively.
SQLAlchemy's String types then don't need to
apply any kind of conversions.
2010-04-03 15:33:55 -04:00
Mike Bayer e8d8c999d2 dont create tables here 2010-04-03 14:08:45 -04:00
Mike Bayer ac99c856c7 correct changelog 2010-04-03 11:09:58 -04:00
Mike Bayer efa88d4af9 branch merge 2010-04-03 11:00:19 -04:00
Mike Bayer f432bc8fe1 - the Numeric type raises an *enormous* warning when expected
to convert floats to Decimal from a DBAPI that returns floats.
This includes SQLite, Oracle, Sybase, MS-SQL.
[ticket:1759]
2010-04-03 10:58:13 -04:00
Mike Bayer 724012541b add FunctionElement example 2010-04-02 17:45:10 -04:00
Mike Bayer e1c47d12bf - The ORM will set the docstring of all generated descriptors
to None by default.  This can be overridden using 'doc'
(or if using Sphinx, attribute docstrings work too).

- Added kw argument 'doc' to all mapper property callables
as well as Column().  Will assemble the string 'doc' as
the '__doc__' attribute on the descriptor.
2010-04-02 17:22:16 -04:00
Mike Bayer d057f98b8a branch merge 2010-04-02 16:27:59 -04:00
Mike Bayer 3467339f7e remove erronrous link to "addresses" 2010-04-02 16:15:17 -04:00
Gaëtan de Menten 646afe94ff ... also when changing the row dynamically 2010-04-02 20:34:02 +02:00
Gaëtan de Menten 7e25d8218b - made the C version of RowProxy accept any sequence for the row, instead of
only tuples
2010-04-02 20:29:37 +02:00
Mike Bayer df1b86bc17 - Updated attribute_shard.py example to use a more robust
method of searching a Query for binary expressions which
compare columns against literal values.
2010-04-02 13:10:55 -04:00
Mike Bayer a3a85ed54f - Declarative will raise an informative error message
if a non-mapped class attribute is referenced in the
string-based relationship() arguments.
2010-04-02 12:42:54 -04:00
Mike Bayer 367bc4a9e5 working through cycles tests... 2010-04-01 19:06:35 -04:00
Mike Bayer 62cf9c8f8f many-to-one completed for self-referential 2010-04-01 18:40:11 -04:00
Mike Bayer bffdb4db35 the delete parent o2m test 2010-04-01 16:23:02 -04:00
Mike Bayer b52341255c refactor dependency elements 2010-04-01 16:13:06 -04:00
Mike Bayer 6748147658 this version passes one to many tests so far 2010-04-01 16:00:57 -04:00
Mike Bayer bef05275aa self-referential working to a small degree 2010-04-01 13:19:14 -04:00
Mike Bayer cc8ec5ab78 one more rule 2010-04-01 12:50:57 -04:00
Mike Bayer 3b7ef1b32d - id(obj) is no longer used internally within topological.py,
as the sorting functions now require hashable objects
only.  [ticket:1756]
2010-04-01 12:45:51 -04:00
Mike Bayer 89afcfdda4 beginning to address cycles but its not worked out yet 2010-03-31 17:31:34 -04:00
Mike Bayer 15f4a6ef05 deletes, rudimentary many-to-ones 2010-03-31 15:46:48 -04:00
Mike Bayer 03fecba819 really got topological going. now that we aren't putting fricking mapped objects into
it all that id() stuff can go
2010-03-31 15:12:29 -04:00
Mike Bayer 1258d1ed9e - 'cycle' is a stack here - needs to be a list. 2010-03-31 13:52:57 -04:00
Mike Bayer 97ed8d4795 its alive ! 2010-03-31 13:25:13 -04:00