Re-add comments

This commit is contained in:
binwiederhier
2026-02-20 16:15:07 -05:00
parent eb6e1ac44a
commit 13a3062a7f
2 changed files with 9 additions and 1 deletions

View File

@@ -135,6 +135,11 @@ func NewNopStore() (Store, error) {
}
// createMemoryFilename creates a unique memory filename to use for the SQLite backend.
// From mattn/go-sqlite3: "Each connection to ":memory:" opens a brand new in-memory
// sql database, so if the stdlib's sql engine happens to open another connection and
// you've only specified ":memory:", that connection will see a brand new database.
// A workaround is to use "file::memory:?cache=shared" (or "file:foobar?mode=memory&cache=shared").
// Every connection to this string will point to the same in-memory database."
func createMemoryFilename() string {
return fmt.Sprintf("file:%s?mode=memory&cache=shared", util.RandomString(10))
}