/ kvdb / kvdb_no_sqlite.go
kvdb_no_sqlite.go
 1  //go:build !kvdb_sqlite || (windows && (arm || 386)) || (linux && (ppc64 || mips || mipsle || mips64))
 2  
 3  package kvdb
 4  
 5  import (
 6  	"fmt"
 7  	"runtime"
 8  
 9  	"github.com/btcsuite/btcwallet/walletdb"
10  )
11  
12  var errSqliteNotAvailable = fmt.Errorf("sqlite backend not available either "+
13  	"due to the `kvdb_sqlite` build tag not being set, or due to this "+
14  	"OS(%s) and/or architecture(%s) not being supported", runtime.GOOS,
15  	runtime.GOARCH)
16  
17  // SqliteBackend is conditionally set to false when the kvdb_sqlite build tag is
18  // not defined. This will allow testing of other database backends.
19  const SqliteBackend = false
20  
21  // StartSqliteTestBackend is a stub returning nil, and errSqliteNotAvailable
22  // error.
23  func StartSqliteTestBackend(path, name, table string) (walletdb.DB, error) {
24  	return nil, errSqliteNotAvailable
25  }