MCPcopy
hub / github.com/rqlite/rqlite / Open

Function Open

db/db.go:236–238  ·  view source on GitHub ↗

Open opens a file-based database using the default driver.

(dbPath string, fkEnabled, wal bool)

Source from the content-addressed store, hash-verified

234
235// Open opens a file-based database using the default driver.
236func Open(dbPath string, fkEnabled, wal bool) (retDB *DB, retErr error) {
237 return OpenWithDriver(DefaultDriver(), dbPath, fkEnabled, wal)
238}
239
240// OpenWithDriver opens a file-based database, creating it if it does not exist.
241// After this function returns, an actual SQLite file will always exist. If the

Callers 15

Test_Restore_DBAndWALsFunction · 0.92
mustQueryDBFunction · 0.92
VerifyDBMethod · 0.92
Test_UpdateHook_BasicFunction · 0.85
Test_UpdateHook_TxFunction · 0.85
Test_SwapSuccessFunction · 0.85
Test_SwapSuccess_DriverFunction · 0.85
Test_CommitHookFunction · 0.85
Test_CommitHook_RollbackFunction · 0.85
Test_CommitHook_TxFunction · 0.85

Calls 2

OpenWithDriverFunction · 0.85
DefaultDriverFunction · 0.85

Tested by 15

Test_Restore_DBAndWALsFunction · 0.74
mustQueryDBFunction · 0.74
Test_UpdateHook_BasicFunction · 0.68
Test_UpdateHook_TxFunction · 0.68
Test_SwapSuccessFunction · 0.68
Test_SwapSuccess_DriverFunction · 0.68
Test_CommitHookFunction · 0.68
Test_CommitHook_RollbackFunction · 0.68
Test_CommitHook_TxFunction · 0.68
Test_DBVacuumIntoFunction · 0.68