An alternative would be to load you records in a table defined in a
DAL('SQLITE:memory') database, then you can use the regular validators
and DB commands.

On Apr 12, 11:00 am, Carlos <carlosgali...@gmail.com> wrote:
> Hi,
>
> For now, I've implemented a tricky work-around that seems to work properly
> for the special cases I describe, and without repeating any code.
>
> In case anyone is interested:
>
> class tmp_dbset(object):
>     def __init__(self, owner):
>         self.db = db
>         self.owner = owner
>     def select(self, *args, **kwargs):
>         return self.owner.rows
>
> class x_IS_IN_DB(IS_IN_DB):
>     def __init__(self, *args, **kwargs):
>         self.rows = None
>         super(x_IS_IN_DB, self).__init__(*args, **kwargs)
>     def build_set(self):
>         # print 'x_IS_IN_DB.build_set > rows', _rowids(self.rows)
>         usetmp = not self.rows is None
>         if usetmp:
>             backup = self.dbset
>             self.dbset = tmp_dbset(self)
>         result = super(x_IS_IN_DB, self).build_set()
>         if usetmp:
>             self.dbset = backup
>         return result
>
> Take care,
>
>    Carlos

Reply via email to