Chore: Make cgo optional (for sqlite) (#108756)
* make cgo optional for sqlite * update go.mod; check error code differently * reduce api surface even more * move test errors into sqlite package * add a comment
This commit is contained in:
@@ -10,9 +10,9 @@ import (
|
||||
|
||||
"github.com/gchaincl/sqlhooks"
|
||||
"github.com/go-sql-driver/mysql"
|
||||
"github.com/grafana/grafana/pkg/util/sqlite"
|
||||
"github.com/grafana/grafana/pkg/util/xorm/core"
|
||||
"github.com/lib/pq"
|
||||
"github.com/mattn/go-sqlite3"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
@@ -42,7 +42,7 @@ func init() {
|
||||
// database queries. It also registers the metrics.
|
||||
func WrapDatabaseDriverWithHooks(dbType string, tracer tracing.Tracer) string {
|
||||
drivers := map[string]driver.Driver{
|
||||
migrator.SQLite: &sqlite3.SQLiteDriver{},
|
||||
migrator.SQLite: &sqlite.Driver{},
|
||||
migrator.MySQL: &mysql.MySQLDriver{},
|
||||
migrator.Postgres: &pq.Driver{},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user