require(SQRL)
# Show (automatic) data sources.
sqrlSources()
if (FALSE) {
# If 'ratatoskr' were one of those sources (i.e.,
# if a DSN of that name was found), then a multi-
# statement query could be submitted like so:
ratatoskr("use yggdrasil; select messages from ",
"vedfolnir where addressee = 'nidhogg' ",
"limit ", 5)
# Submit a parameterised query from file.
ratatoskr("messages.sqrl", year = 950)
# Obtain help on usage.
ratatoskr("help")
}
# Define a new data source (interface).
sqrlSource("mysource",
driver = "MYSQL ODBC 5.3 ANSI Driver",
server = "localhost",
user = "",
password = "")
if (FALSE) {
# Submit a query to the new source.
mysource("select * from database.table")
}
Run the code above in your browser using DataLab