Skip to contents

Recursively finds all .sql files under dir_path and reads each one into a row of a data.frame. UTF-8 BOM is stripped automatically (common in files saved by SQL Server Management Studio).

Usage

sq_read_sql_files(dir_path)

Arguments

dir_path

Path to the directory containing .sql files.

Value

A data.frame with columns filename, filepath, and content (the full file text as a single string).

Examples

if (FALSE) { # \dontrun{
scripts <- sq_read_sql_files("C:/deploy/sql")
} # }