コード例 #1
0
 def select(*q, **where):
     if where:
         print "database.select's kwd arguments have been deprecated in favor of query"
     result = list(q)
     for k, v in where.iteritems():
         if v is None:
             result.append(query.hasattr(k))
             continue
         result.append(query.hasvalue(k, v))
     return __select(query._and(*result))
コード例 #2
0
ファイル: database.py プロジェクト: corelanc0d3r/toolbag
def select(*q, **where):
    if where:
        print "database.select's kwd arguments have been deprecated in favor of query"
    result = list(q)
    for k,v in where.iteritems():
        if v is None:
            result.append( query.hasattr(k) )
            continue
        result.append( query.hasvalue(k,v) )
    return __select( query._and(*result) )