src/dirbs/listgen/generator.py
def _populate_blocking_conditions_table(self, conn):
        """Function to populate the blocking conditions table for this run."""
        with conn.cursor() as cursor, CodeProfiler() as cp:
            tblname = self._blocking_conditions_new_tblname
            execute_values(cursor,
                           sql.SQL("""INSERT INTO {0}(cond_name, reason)
                                           VALUES %s""").format(sql.Identifier(tblname)).as_string(cursor),
                           [(c.label, c.reason) for c in self._blocking_conditions])
            self._add_pk(conn, tblname=tblname, pk_columns=['cond_name'])
            self._analyze_helper(cursor, tblname)

        # Need to get table count since execute_values doesn't retain insert count
        num_records = self._get_total_record_count(conn, tblname)
        return num_records, cp.duration
Function to populate the blocking conditions table for this run.
Function to populate the blocking conditions table for this run.
Function to populate the blocking conditions table for this run .
def _populate_blocking_conditions_table(self, conn):
        with conn.cursor() as cursor, CodeProfiler() as cp:
            tblname = self._blocking_conditions_new_tblname
            execute_values(cursor,
                           sql.SQL("""INSERT INTO {0}(cond_name, reason)
                                           VALUES %s""").format(sql.Identifier(tblname)).as_string(cursor),
                           [(c.label, c.reason) for c in self._blocking_conditions])
            self._add_pk(conn, tblname=tblname, pk_columns=['cond_name'])
            self._analyze_helper(cursor, tblname)
        num_records = self._get_total_record_count(conn, tblname)
        return num_records, cp.duration
def _populate_blocking_conditions_table ( self , conn ) : with conn . cursor ( ) as cursor , CodeProfiler ( ) as cp : tblname = self . _blocking_conditions_new_tblname execute_values ( cursor , sql . SQL ( """INSERT INTO {0}(cond_name, reason)
                                           VALUES %s""" ) . format ( sql . Identifier ( tblname ) ) . as_string ( cursor ) , [ ( c . label , c . reason ) for c in self . _blocking_conditions ] ) self . _add_pk ( conn , tblname = tblname , pk_columns = [ 'cond_name' ] ) self . _analyze_helper ( cursor , tblname ) num_records = self . _get_total_record_count ( conn , tblname ) return num_records , cp . duration
Function to populate the blocking conditions table for this run.
Function to populate the blocking conditions table for this run .
"""Function to populate the blocking conditions table for this run.""" # Need to get table count since execute_values doesn't retain insert count
self
conn