List Info

Thread: Using db.klass.set_inner() in reactors




Using db.klass.set_inner() in reactors
user name
2007-04-04 10:55:45
Hello

In short I'd like to know if it is reasonable to use the
Class.set_inner() method that is available only in the
backend (at
least in roundup.backends.back_sqlite.Class) but not in the
roundup.hyperdb.Class.

I want to use this because using the Class.set() method
directly
invokes the auditors and reactors, while being inside a
reactor that
is not really what I want (not to mention possible
recursion).  And I
need to use the db.someclass.set() method as I want to
modify a
property of an unrelated class.  More specifically when a
Link or
Mulitlink property on the current item is set to another
item (of
another class) I want that other class to also link to this
item.

So is it acceptable to use the Class.set_inner() method for
this, or
is that method supposed to be hidden?  Or maybe it is not
even
available for all backends?

As an asside I don't really see why the set() method is
implemented in
the backend, to me it would be more logical if the
hyperdb.Class
implemented the set() method and leave only set_inner() to
the
backend.  I think that would remove code duplication.

Regards
Floris

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Roundup-users mailing list
Roundup-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/roundup-u
sers

Re: Using db.klass.set_inner() in reactors
country flaguser name
Australia
2007-04-05 17:25:30
On Thu, 5 Apr 2007, Floris Bruynooghe wrote:
> So is it acceptable to use the Class.set_inner() method
for this, or
> is that method supposed to be hidden?

It's not part of the formal API. I would not recomment using
it as a way to 
get around a detector race condition, but rather re-examine
the detector 
design.


    Richard

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Roundup-users mailing list
Roundup-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/roundup-u
sers

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )