MCPcopy Index your code
hub / github.com/riverqueue/river / openSQLitePool

Function openSQLitePool

cmd/river/rivercli/command.go:181–191  ·  view source on GitHub ↗
(protocol, urlWithoutProtocol string)

Source from the content-addressed store, hash-verified

179}
180
181func openSQLitePool(protocol, urlWithoutProtocol string) (*sql.DB, error) {
182 dbPool, err := sql.Open(protocol, urlWithoutProtocol)
183 if err != nil {
184 return nil, fmt.Errorf("error connecting to SQLite database: %w", err)
185 }
186
187 // See notes on this in `riversharedtest.DBPoolSQLite`.
188 dbPool.SetMaxOpenConns(1)
189
190 return dbPool, nil
191}
192
193// Determines if there's a minimum number of `PG*` env vars configured to
194// consider that configurable path viable. A `--database-url` parameter will

Callers 1

RunCommandFunction · 0.85

Calls 2

OpenMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…