sqldb: exclude sqlite from the JS and unsupported platform builds

This commit is contained in:
Andras Banki-Horvath committed 2024-03-01 10:08:09 +01:00
1 parent 88370de1ab
commit ce1b57da2d
7 files changed
+198 -83

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
//go:build js || (windows && (arm || 386)) || (linux && (ppc64 || mips || mipsle || mips64))
package sqldb
import "fmt"
// SqliteStore is a database store implementation that uses a sqlite backend.
type SqliteStore struct {
cfg *SqliteConfig
*BaseDB
}
// NewSqliteStore attempts to open a new sqlite database based on the passed
// config.
func NewSqliteStore(cfg *SqliteConfig, dbPath string) (*SqliteStore, error) {
return nil, fmt.Errorf("SQLite backend not supported in WebAssembly")
}