MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Create

Method Create

sqlchain/adapter/storage/covenantsql.go:37–53  ·  view source on GitHub ↗

Create implements the Storage abstraction interface.

(nodeCnt int)

Source from the content-addressed store, hash-verified

35
36// Create implements the Storage abstraction interface.
37func (s *CovenantSQLStorage) Create(nodeCnt int) (dbID string, err error) {
38 var meta = client.ResourceMeta{}
39 meta.Node = uint16(nodeCnt)
40
41 var dsn string
42 if _, dsn, err = client.Create(meta); err != nil {
43 return
44 }
45
46 var cfg *client.Config
47 if cfg, err = client.ParseDSN(dsn); err != nil {
48 return
49 }
50
51 dbID = cfg.DatabaseID
52 return
53}
54
55// Drop implements the Storage abstraction interface.
56func (s *CovenantSQLStorage) Drop(dbID string) (err error) {

Callers

nothing calls this directly

Calls 2

CreateFunction · 0.92
ParseDSNFunction · 0.92

Tested by

no test coverage detected