(db, filename, log)
Find SQL file and apply it to db, statement-by-statement.
Find SQL file and apply it to db, statement-by-statement.
Find SQL file and apply it to db statement - by - statement .
def installer_apply_file(db, filename, log):
    """Find SQL file and apply it to db, statement-by-statement."""
    fn = installer_find_file(filename)
    sql = open(fn, "r").read()
    if log:
        log.info("applying %s" % fn)
    curs = db.cursor()
    for stmt in skytools.parse_statements(sql):
        #log.debug(repr(stmt))
        curs.execute(stmt)
def installer_apply_file ( db , filename , log ) : fn = installer_find_file ( filename ) sql = open ( fn , "r" ) . read ( ) if log : log . info ( "applying %s" % fn ) curs = db . cursor ( ) for stmt in skytools . parse_statements ( sql ) : #log.debug(repr(stmt)) curs . execute ( stmt )