| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -9,7 +9,6 @@ from engine.utils import (base62alp, base62uuid, enlist, get_innermost,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                          get_legal_name)
 | 
					 | 
					 | 
					 | 
					                          get_legal_name)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from reconstruct.storage import ColRef, Context, TableInfo
 | 
					 | 
					 | 
					 | 
					from reconstruct.storage import ColRef, Context, TableInfo
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class ast_node:
 | 
					 | 
					 | 
					 | 
					class ast_node:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    header = []
 | 
					 | 
					 | 
					 | 
					    header = []
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    types = dict()
 | 
					 | 
					 | 
					 | 
					    types = dict()
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1535,7 +1534,25 @@ class udf(ast_node):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return udf.ReturnPattern.elemental_return
 | 
					 | 
					 | 
					 | 
					            return udf.ReturnPattern.elemental_return
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        else:
 | 
					 | 
					 | 
					 | 
					        else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return udf.ReturnPattern.bulk_return
 | 
					 | 
					 | 
					 | 
					            return udf.ReturnPattern.bulk_return
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					class passthru_sql(ast_node):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    name = 'sql'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    first_order = name
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    import re
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    # escapestr = r'''(?:((?:[^;"']|"[^"]*"|'[^']*')+)|(?:--[^\r\n]*[\r|\n])+)'''
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    # escape_comment = fr'''(?:{escapestr}|{escapestr}*-{escapestr}*)'''
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    seprator = re.compile(r'''((?:[^;"']|"[^"]*"|'[^']*')+)''')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    def __init__(self, _, node, context:Context):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        sqls = passthru_sql.seprator.split(node['sql'])
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        for sql in sqls:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            sq = sql.strip(' \t\n\r;')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if sq:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                context.queries.append('Q' + sql + ';')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                lq = sq.lower()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                if lq.startswith('select'):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                    context.queries.append('O')
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class user_module_function(OperatorBase):
 | 
					 | 
					 | 
					 | 
					class user_module_function(OperatorBase):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    def __init__(self, name, nargs, ret_type, context : Context):
 | 
					 | 
					 | 
					 | 
					    def __init__(self, name, nargs, ret_type, context : Context):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        super().__init__(name, nargs, lambda *_: ret_type, call=fn_behavior)
 | 
					 | 
					 | 
					 | 
					        super().__init__(name, nargs, lambda *_: ret_type, call=fn_behavior)
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |