MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / NewSQLite3Storage

Function NewSQLite3Storage

sqlchain/adapter/storage/sqlite3.go:38–46  ·  view source on GitHub ↗

NewSQLite3Storage returns the sqlite3 storage abstraction.

(rootDir string)

Source from the content-addressed store, hash-verified

36
37// NewSQLite3Storage returns the sqlite3 storage abstraction.
38func NewSQLite3Storage(rootDir string) (s *SQLite3Storage, err error) {
39 if err = os.MkdirAll(rootDir, 0755); err != nil {
40 return
41 }
42 if rootDir, err = filepath.Abs(rootDir); err != nil {
43 return
44 }
45 return &SQLite3Storage{rootDir: rootDir}, nil
46}
47
48// Create implements the Storage abstraction interface.
49func (s *SQLite3Storage) Create(nodeCnt int) (dbID string, err error) {

Callers 1

LoadConfigFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected