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

Method Open

client/driver.go:86–100  ·  view source on GitHub ↗

Open returns new db connection.

(dsn string)

Source from the content-addressed store, hash-verified

84
85// Open returns new db connection.
86func (d *covenantSQLDriver) Open(dsn string) (conn driver.Conn, err error) {
87 var cfg *Config
88 if cfg, err = ParseDSN(dsn); err != nil {
89 return
90 }
91
92 if atomic.LoadUint32(&driverInitialized) == 0 {
93 err = defaultInit()
94 if err != nil && err != ErrAlreadyInitialized {
95 return
96 }
97 }
98
99 return newConn(cfg)
100}
101
102// ResourceMeta defines new database resources requirement descriptions.
103type ResourceMeta struct {

Callers 15

TestOpenFunction · 0.95
TestConnFunction · 0.45
TestTransactionFunction · 0.45
TestStmtFunction · 0.45
WaitDBCreationFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
removeFileIfIsNotSQLiteFunction · 0.45
TestFullProcessFunction · 0.45
getConnMethod · 0.45
getConnMethod · 0.45

Calls 3

ParseDSNFunction · 0.85
defaultInitFunction · 0.85
newConnFunction · 0.85

Tested by 11

TestOpenFunction · 0.76
TestConnFunction · 0.36
TestTransactionFunction · 0.36
TestStmtFunction · 0.36
TestFullProcessFunction · 0.36
TestFullProcessFunction · 0.36
TestMemInfoNumaFunction · 0.36
TestMemInfoNumaStatFunction · 0.36
TestMemInfoFunction · 0.36
TestDiskStatsFunction · 0.36