You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -459,12 +459,16 @@ For an example see [shaxbee/go-spatialite](https://github.com/shaxbee/go-spatial
459
459
Each connection to :memory: opens a brand new in-memory sql database, so if
460
460
the stdlib's sql engine happens to open another connection and you've only
461
461
specified ":memory:", that connection will see a brand new database. A
462
-
workaround is to use "file::memory:?mode=memory&cache=shared". Every
463
-
connection to this string will point to the same in-memory database.
462
+
workaround is to use `"file::memory:?cache=shared"` (or `"file:foobar?mode=memory&cache=shared"`). Every
463
+
connection to this string will point to the same in-memory database.
464
+
465
+
Note that if the last database connection in the pool closes, the in-memory database is deleted. Make sure the [max idle connection limit](https://golang.org/pkg/database/sql/#DB.SetMaxIdleConns) is > 0, and the [connection lifetime](https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime) is infinite.
0 commit comments