zeroshade commented on code in PR #4009:
URL: https://github.com/apache/arrow-adbc/pull/4009#discussion_r2854162917


##########
go/adbc/adbc.go:
##########
@@ -341,6 +353,19 @@ type Driver interface {
        NewDatabase(opts map[string]string) (Database, error)
 }
 
+// DriverWithContext is an extension interface to allow the creation of a 
database
+// by providing an existing [context.Context] to initialize OpenTelemetry 
tracing.
+// It is similar to [database/sql.Driver] taking a map of keys and values as 
options
+// to initialize a [Connection] to the database. Any common connection
+// state can live in the Driver itself, for example an in-memory database
+// can place ownership of the actual database in this driver.
+//
+// Any connection specific options should be set using SetOptions before
+// calling Open.
+type DriverWithContext interface {
+       NewDatabaseWithContext(ctx context.Context, opts map[string]string) 
(Database, error)

Review Comment:
   Changing this has a knock-on effect of causing us to have to update and 
cause breaking changes to the bigquery and databricks drivers here which 
currently implement both `NewDatabase` and `NewDatabaseWithContext`. If we 
change this, we have to update all of those drivers by removing the version 
without a context. Are we okay with that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to