lnd/kvdb/kvdb_no_sqlite.go
2023-01-23 09:14:08 +02:00

26 lines
806 B
Go

//go:build !kvdb_sqlite || (windows && (arm || 386)) || (linux && (ppc64 || mips || mipsle || mips64))
package kvdb
import (
"fmt"
"runtime"
"github.com/btcsuite/btcwallet/walletdb"
)
var errSqliteNotAvailable = fmt.Errorf("sqlite backend not available either "+
"due to the `kvdb_sqlite` build tag not being set, or due to this "+
"OS(%s) and/or architecture(%s) not being supported", runtime.GOOS,
runtime.GOARCH)
// SqliteBackend is conditionally set to false when the kvdb_sqlite build tag is
// not defined. This will allow testing of other database backends.
const SqliteBackend = false
// StartSqliteTestBackend is a stub returning nil, and errSqliteNotAvailable
// error.
func StartSqliteTestBackend(path, name, table string) (walletdb.DB, error) {
return nil, errSqliteNotAvailable
}