[SQLObject] Enhanced IN Operator, interest in patch?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Gregor H. <gh...@gr...> - 2011-03-22 08:27:26
|
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 |