You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but the DBI::dbConnect API is formulated relative to OdbcDriver, not OdbcConnection. I don't think this is causing issues, right now, however if nobody objects, i plan on changing the snowflake() call to return an object that inherits from OdbcDriver. This will also align the Snowflake and Databricks API.
The text was updated successfully, but these errors were encountered:
Ah, interesting. Nice catch! Just talking myself through this:
Backends that don't have a connection helper just have e.g. setClass("DBMSName", contains = "OdbcConnection") which kicks in from dbConnect(odbc()) output and the methods are inherited via DBMSName. The driver class is generic to odbc(), the connection class is DBMS-specific.
Databricks has databricks() which returns an DatabricksOdbcDriver < OdbcDriver. A dbConnect() method is defined relative to it, otherwise Databricks just inherits its methods from setClass("Spark SQL", contains = "OdbcConnection") (i.e. based on the output of dbConnect()). The driver class is DBMS-specific, the connection class kind of is even though it doesn't use the DBMS name explicitly.
Snowflake has snowflake() which returns a new("Snowflake") as setClass("Snowflake", contains = "OdbcConnection"). The resulting connection object from dbConnect()also has class "Snowflake" and methods are defined relative to that class. The driver and connection classes are DBMS-specific but, unfortunately, identical. We can thus split off the driver class to be DBMS-specific but also be disambiguated from the connection class.
So we do make snowflake() return new("SnowflakeOdbcDriver") which is just setClass("SnowflakeOdbcDriver", contains = "OdbcDriver"), as you suggest, and transition dbConnect from working on Snowflake instead to SnowflakeOdbcDriver, but then keep all of the existing "Snowflake" class and methods code as-is, since it defines behavior on the connection rather than the driver?
We have
but the
DBI::dbConnect
API is formulated relative toOdbcDriver
, notOdbcConnection
. I don't think this is causing issues, right now, however if nobody objects, i plan on changing thesnowflake()
call to return an object that inherits fromOdbcDriver
. This will also align theSnowflake
andDatabricks
API.The text was updated successfully, but these errors were encountered: