예제 #1
0
파일: ddl.py 프로젝트: alipqb/edgedb
 def reduce_DropOperator(self, *kids):
     """%reduce
        DROP OperatorKind OPERATOR NodeName CreateFunctionArgs
     """
     self.val = qlast.DropOperator(
         kind=qltypes.OperatorKind(kids[1].val.upper()),
         name=kids[3].val,
         params=kids[4].val,
     )
예제 #2
0
파일: ddl.py 프로젝트: alipqb/edgedb
 def reduce_AlterOperatorStmt(self, *kids):
     """%reduce
        ALTER OperatorKind OPERATOR NodeName CreateFunctionArgs
        AlterOperatorCommandsBlock
     """
     self.val = qlast.AlterOperator(
         kind=qltypes.OperatorKind(kids[1].val.upper()),
         name=kids[3].val,
         params=kids[4].val,
         commands=kids[5].val
     )
예제 #3
0
파일: ddl.py 프로젝트: alipqb/edgedb
 def reduce_CreateOperatorStmt(self, *kids):
     r"""%reduce
         CREATE OperatorKind OPERATOR NodeName CreateFunctionArgs
         ARROW OptTypeQualifier FunctionType
         CreateOperatorCommandsBlock
     """
     self.val = qlast.CreateOperator(
         kind=qltypes.OperatorKind(kids[1].val.upper()),
         name=kids[3].val,
         params=kids[4].val,
         returning_typemod=kids[6].val,
         returning=kids[7].val,
         **self._process_operator_body(kids[8])
     )
예제 #4
0
파일: ddl.py 프로젝트: alipqb/edgedb
 def reduce_CreateAbstractOperatorStmt(self, *kids):
     r"""%reduce
         CREATE ABSTRACT OperatorKind OPERATOR NodeName CreateFunctionArgs
         ARROW OptTypeQualifier FunctionType
         OptCreateOperatorCommandsBlock
     """
     self.val = qlast.CreateOperator(
         kind=qltypes.OperatorKind(kids[2].val.upper()),
         name=kids[4].val,
         params=kids[5].val,
         returning_typemod=kids[7].val,
         returning=kids[8].val,
         is_abstract=True,
         **self._process_operator_body(kids[9], abstract=True)
     )