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

chore: clean up check_* in dbi-driver #848

Closed
detule opened this issue Sep 24, 2024 · 1 comment · Fixed by #851
Closed

chore: clean up check_* in dbi-driver #848

detule opened this issue Sep 24, 2024 · 1 comment · Fixed by #851

Comments

@detule
Copy link
Collaborator

detule commented Sep 24, 2024

There are a number of arguments ( encoding, timezone, timeout, etc ) for which allow_null is set to TRUE on one hand, and on the other we simply pass them through the C/++ layer ( where they are strongly typed ).

  • Verify that in fact they are not allowed to be NULL ( expect Rcpp to complain ).
  • Update the arguments to the check_* methods; probably better to throw a nicely formatted error.
@detule
Copy link
Collaborator Author

detule commented Sep 29, 2024

Currently:

conn <- dbConnect(odbc::odbc(), dsn = "mssql_oem_db", encoding = NULL )
Error: Expecting a single string value: [type=NULL; extent=0].
> conn <- dbConnect(odbc::odbc(), dsn = "mssql_oem_db", timezone = NULL )
Error: Expecting a single string value: [type=NULL; extent=0].
> conn <- dbConnect(odbc::odbc(), dsn = "mssql_oem_db", timezone_out = NULL )
Error: Expecting a single string value: [type=NULL; extent=0].
> conn <- dbConnect(odbc::odbc(), dsn = "mssql_oem_db", timeout = NULL )
Error in if (is.infinite(timeout)) { : argument is of length zero

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

Successfully merging a pull request may close this issue.

1 participant