ropensci / nodbi

Document DBI connector for R
https://docs.ropensci.org/nodbi
Other
76 stars 6 forks source link

src_sqlite: fix for table / collection names with special characters #37

Closed rfhb closed 3 years ago

rfhb commented 3 years ago

Description

The result of the changes is that the parameter key of functions docdb_* now accepts special characters, which so far were not fully escaped in the code for src_sqlite. Parameter key specifies a table name for src_sqlite (and a collection for src_mongo). Minor clarifying edits to the corresponding documentation were also included.

Related Issue

None

Example

This now works:

library(nodbi)
con <- src_sqlite()
docdb_create(src = con, key = "table-name-with-dash", value = mtcars)
docdb_query(src = con, key = "table-name-with-dash", query = "{}", fields = '{"mpg":1, "cyl": 1}')
sckott commented 3 years ago

@rfhb i'm on leave for another three weeks. go ahead and merge, etc as needed

rfhb commented 3 years ago

@sckott cool, will do, thanks - enjoy!