View source: R/read_sql_lines.R
read_sql_lines | R Documentation |
This is a generic function to ensure lines read from a file, a single character vector, or already parsed lines return the same format. This helps avoid re-reading entire texts by enabling already read lines to pass easily.
This is useful for folks who may want to extend qryflow.
read_sql_lines(x)
x |
a filepath or character vector containing SQL |
A qryflow_sql
object (inherits from character) with a length equal to the number of lines read
# From a file #####
path <- example_sql_path()
read_sql_lines(path)
# From a single string #####
sql <- "SELECT *
FROM mtcars;"
read_sql_lines(sql)
# From a character #####
lines <- c("SELECT *", "FROM mtcars;")
read_sql_lines(lines)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.