openjusticeok / ojodb

OJO's R package for opening the black box of our justice system
https://openjusticeok.github.io/ojodb/
GNU General Public License v3.0
5 stars 3 forks source link

Replaced pool::dbListFields() with a more straightforward pool::dbGet… #103

Closed andrewjbe closed 1 year ago

brancengregory commented 1 year ago

The other reason is because you can avoid the parentheses problem. Look at the docs for glue SQL. You can use syntax like this:

table <- "case"
db <- ojo_connect()

glue_sql("select * from {table}", .con = db)

Glue takes care of escaping the table name with parentheses since 'case' is an SQL keyword