Comments (5)
querySql currently does not alter the variable names, but in all OHDSI packages we now have the convention that after calling querySql we will automatically convert snake_case to camelCase.
If we don't do that, but follow your suggestion that we simply convert camel_case to UPPER_CASE_SNAKE_CASE, the consequence would be that all our R code will now have a mixture of naming conventions. Variables derived from a database would be SNAKE_CASE, while other variables would use camelCase. This gets really complicated when DATABASE_VARIABLES are modified in R. Should they then still be SNAKE_CASE, or camelCase?
The current solution guarantees we have only 1 naming convention in SQL, and only 1 in R.
from databaseconnector.
The current version calls toupper(). Unless I am reading something wrong.
Do we want this to stay or be removed ?
I think it currently DOES alter the variable names!!!
from databaseconnector.
If it changes, we'll have a significant amount of re-write to do, and apps will break until the rewrite is complete. If we want to make this change, it's going to have to be done in a special branch, and all dependent apps will need to coordinate all their releases based on this change.
from databaseconnector.
Ah yes, I forgot about the ucase. The reason why I added is that some dbmss convert all names to upper case, some convert all to lower case, and some maintain the case of the original 'create table' statement. At least with the ucase, behavior across platforms is consistent.
Note that SqlRender's snakeCaseToCamelCase function ignores the case of the input. Most code would therefore be unaffected if we remove this.
Could you give me a use case why the ucase should be removed? Remember that this means that behavior will then be different across platforms, and the user will need to deal with that.
from databaseconnector.
OK. I am glad that I was correct in reading the current code.
I vote for leaving everything as is.
BUT - we should clearly say that users should expect always uppercased output when using DatabaseConnect querySql()
from databaseconnector.
Related Issues (20)
- Option to use executeLargeUpdate HOT 7
- Refactor testing code so it iterates over the platforms in a loop HOT 1
- Not dropping default argument to lag() on Redshift
- Optional method of using Ibis backend connectors HOT 2
- DuckDB connection doesn't work without specifying pathToDriver
- Github Actions not recognizing Snowflake secrets HOT 1
- Running out of memory when pushing Andromeda tables to external databases using bulk import HOT 1
- Rethink a bit DatabaseConnector dplyr sql generation HOT 13
- subsetting the database HOT 9
- Call to Andromeda causing unit tests to fail HOT 1
- Use exported odbc classes HOT 1
- DBI::dbIsValid does not seem to work with postgres
- Multiple valid methods for signature: target signature ‘DatabaseConnectorJdbcConnection#Id’.
- DBI::dbCreateTable does not work as expected
- Add Java version to SQL error report
- How to add connection scripts in connectionDetails object? HOT 2
- Implement a `withConnection` context function for ensuring connections close in scripts
- java.sql.SQLFeatureNotSupportedException HOT 1
- DatabaseConnector dbplyr failing on duckdb when joining more than 2 tables
- Inconsistent connection parameters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from databaseconnector.