Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support creating tables with column names that have period in them #11

Open
chronofanz opened this issue Nov 15, 2020 · 0 comments
Open

Comments

@chronofanz
Copy link

Hello there!

Suggested change to wrap the param names in square brackets in the method build_param_list. This would enable us to auto-create tables with periods in the column names (i.e. for the sample R "iris" dataset for instance). However, I don't know if this would have adverse effects elsewhere in the code, so leaving it to you to figure out whether this is the right fix, thanks!

build_param_list <- function(query_params)
{
ps <- mapply(function(name, value)
{
type <- switch(class(value)[1],
"logical"="bool",
"numeric"="real",
"integer64"="long",
"integer"="int",
"Date"="datetime",
"POSIXct"="datetime",
"string"
)
paste(name, type, sep=":")
}, paste0('[', names(query_params), ']'), query_params)

paste0("(", paste(ps, collapse=", "), ")")

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant