Hi,

I've made an enhanced sqlbuilder IN Operator for my own purpose and
would like to ask if there is any interest in a patch for the
sqlbuilder IN operator.

It's enhancement is the ability to deal with SelectResults in addition
to the standard sqlbuilder.Select. The motivation is the need to
create subqueries using previously acquired SelectResults.

def IN_(item, list_):
    if isinstance(list_, SelectResults):
        list_ = Select([list_.sourceClass.q.id],
                       where=list_.clause,
                       join=list_.ops.get('join', NoDefault),
                       distinct=list_.ops.get('distinct',False),
                       lazyColumns=list_.ops.get('lazyColumns', False),
                       start=list_.ops.get('start', 0),
                       end=list_.ops.get('end', None),
                       orderBy=list_.ops.get('dbOrderBy', NoDefault),
                       reversed=list_.ops.get('reversed', False),
                       staticTables=list_.tables,
                       forUpdate=list_.ops.get('forUpdate', False))
    return IN(item, list_)

--
Greg

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to