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:
@@ -0,0 +1,24 @@
|
||||
//go:build !cgo
|
||||
|
||||
package sqlite
|
||||
|
||||
import "modernc.org/sqlite"
|
||||
|
||||
//
|
||||
// FIXME (@zserge)
|
||||
//
|
||||
// This non-CGo "implementation" is merely a stub to make Grafana compile without CGo.
|
||||
// Any attempts to actually use this driver are likely to fail at runtime in the most brutal ways.
|
||||
//
|
||||
|
||||
type Driver = sqlite.Driver
|
||||
|
||||
func IsBusyOrLocked(err error) bool {
|
||||
return false // FIXME
|
||||
}
|
||||
func IsUniqueConstraintViolation(err error) bool {
|
||||
return false // FIXME
|
||||
}
|
||||
func ErrorMessage(err error) string {
|
||||
return "" // FIXME
|
||||
}
|
||||
Reference in New Issue
Block a user