r-dbi / odbc

Connect to ODBC databases (using the DBI interface)
https://odbc.r-dbi.org/
Other
392 stars 107 forks source link

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

Closed detule closed 1 month ago

detule commented 2 months ago

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 ).

detule commented 1 month ago

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