(protocol, urlWithoutProtocol string)
| 179 | } |
| 180 | |
| 181 | func 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 |
no test coverage detected
searching dependent graphs…