(self)
return res
Server-side query execution via plpy.

        Query can be run either cached or uncached, depending
        on C{plan_cache} setting given to L{__init__}.

        Returns result of plpy.execute().
Server-side query execution via plpy.
Server - side query execution via plpy .
def execute(self):
        """Server-side query execution via plpy.

        Query can be run either cached or uncached, depending
        on C{plan_cache} setting given to L{__init__}.

        Returns result of plpy.execute().
        """

        args = self._arg_value_list
        types = self._arg_type_list

        if self._sqls is not None:
            self._sqls.append( { "sql": self.get_sql(PARAM_INLINE) } )

        if self._plan_cache is not None:
            sql = self.get_sql(PARAM_PLPY)
            plan = self._plan_cache.get_plan(sql, types)
            res = plpy.execute(plan, args)
        else:
            sql = self.get_sql(PARAM_INLINE)
            res = plpy.execute(sql)
        if res:
            res = [skytools.dbdict(r) for r in res]
        return res
def execute ( self ) : args = self . _arg_value_list types = self . _arg_type_list if self . _sqls is not None : self . _sqls . append ( { "sql" : self . get_sql ( PARAM_INLINE ) } ) if self . _plan_cache is not None : sql = self . get_sql ( PARAM_PLPY ) plan = self . _plan_cache . get_plan ( sql , types ) res = plpy . execute ( plan , args ) else : sql = self . get_sql ( PARAM_INLINE ) res = plpy . execute ( sql ) if res : res = [ skytools . dbdict ( r ) for r in res ] return res