Project

General

Profile

« Previous | Next » 

Revision 3496

sql_gen.py: Added ReturnQuery

View differences:

lib/sql_gen.py
555 555

  
556 556
### PL/pgSQL
557 557

  
558
class ReturnQuery(Code):
559
    def __init__(self, query):
560
        Code.__init__(self)
561
        
562
        query = as_Code(query)
563
        
564
        self.query = query
565
    
566
    def to_str(self, db):
567
        return 'RETURN QUERY\n'+strings.indent(self.query.to_str(db))+';\n'
568

  
558 569
class ExcHandler(BasicObject):
559 570
    def __init__(self, exc, handler=None):
560 571
        if handler != None: handler = as_Code(handler)

Also available in: Unified diff