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

Method getConn

sqlchain/adapter/storage/sqlite3.go:135–143  ·  view source on GitHub ↗
(dbID string, readonly bool)

Source from the content-addressed store, hash-verified

133}
134
135func (s *SQLite3Storage) getConn(dbID string, readonly bool) (db *sql.DB, err error) {
136 dbFile := filepath.Join(s.rootDir, dbID+".db3")
137 dbDSN := fmt.Sprintf("file:%s?_journal_mode=WAL&_synchronous=NORMAL", dbFile)
138 if readonly {
139 dbDSN += "&mode=ro"
140 }
141
142 return sql.Open("sqlite3", dbDSN)
143}

Callers 3

CreateMethod · 0.95
QueryMethod · 0.95
ExecMethod · 0.95

Calls 1

OpenMethod · 0.45

Tested by

no test coverage detected