(self, db, sql, args, keycol = None)
return res
Fetch a resultset from db, optionally turning it into value list.
Fetch a resultset from db, optionally turning it into value list.
Fetch a resultset from db optionally turning it into value list .
def fetch_list(self, db, sql, args, keycol = None):
        """Fetch a resultset from db, optionally turning it into value list."""
        curs = db.cursor()
        curs.execute(sql, args)
        rows = curs.fetchall()
        db.commit()
        if not keycol:
            res = rows
        else:
            res = [r[keycol] for r in rows]
        return res
def fetch_list ( self , db , sql , args , keycol = None ) : curs = db . cursor ( ) curs . execute ( sql , args ) rows = curs . fetchall ( ) db . commit ( ) if not keycol : res = rows else : res = [ r [ keycol ] for r in rows ] return res