コード例 #1
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def accept(cls, expr):
     return util.contain(expr, ['whenList', 'thenList', 'elseExpr'])
コード例 #2
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def accept(cls, expr):
     return util.contain(expr, ['selectList'])
コード例 #3
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def accept(cls, expr):
     return util.contain(expr, ['scale', 'isExact', 'value', 'typeName', 'prec']) or \
            (util.contain(expr, ['value', 'typeName']) and isinstance(expr['value'], dict)) or \
            (util.contain(expr, ['typeName']) and str(expr['typeName']).lower() == 'null')
コード例 #4
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def value(self):
     if util.contain(self._expr, ['scale', 'isExact', 'value', 'typeName', 'prec']):
         return self._expr.get('value')
     return self._expr['value']['value']
コード例 #5
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def accept(cls, expr):
     return util.contain(expr, ['operator', 'operands'])
コード例 #6
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def accept(cls, expr):
     return util.contain(expr, ['typeName']) and isinstance(expr['typeName'], dict)
コード例 #7
0
ファイル: visitor.py プロジェクト: sandabuliu/iQuery
 def accept(cls, expr):
     return util.contain(expr, ['names']) and expr.get('key') == 'from'