QueryDb: Send query to database

Description Usage Arguments Value Examples

View source: R/db_retrieval.R

Description

Send a SQL query to the database. Retruns the SQL result as a data.frame. Useful for seeing the structure of the database for construction of queries

Usage

1
QueryDb(query)

Arguments

query

A string containing the SQL query

Value

List, contains the SQL query result.

Examples

1
2
3
4
SetDbPath(example = TRUE)
AddGameEvents(2019020001)
QueryDb("SELECT * FROM events")
QueryDb("SELECT result_description FROM events WHERE game_id=2019020001 AND player_id=8475166")

nhlscrape documentation built on March 26, 2020, 5:29 p.m.