-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add test to assert that table and column names are lowercase #46
Conversation
tests/testthat/test-basic.R
Outdated
@@ -30,6 +30,17 @@ test_that("Connect", { | |||
DatabaseConnector::disconnect(connection) | |||
}) | |||
|
|||
test_that("Table names and column names case", { | |||
connection <- DatabaseConnector::connect(getEunomiaConnectionDetails()) | |||
tableNames <- DatabaseConnector::getTableNames(connection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tableNames <- DatabaseConnector::getTableNames(connection, cast = "none")
Perhaps you should suppress the casting that is done by getTableNames to ensure the columns are actually lowercase in the database. I'd probably use DBI for this but DatabaseConnector::getTableNames should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ablack3 that's a good point about the cast argument, I didn't know that. I saw that you have added the parameter quite recently and so it's only available in DatabaseConnector starting from 6.0.0. Should we therefore increase the minimum version of DatabaseConnector in the DESCRIPTION file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ablack3 I have updated the test
…ector since from that version table names have been made lowercase
Looks good to me @ginberg! Thanks for this contribution. |
see #44