Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 134b8a6

Browse files
authored
Merge pull request #3 from mattn/master
Keep up with 3.28.0
2 parents 8e25596 + 070b17a commit 134b8a6

File tree

6 files changed

+8430
-6007
lines changed

6 files changed

+8430
-6007
lines changed

‎.github/FUNDING.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: mattn # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
custom: # Replace with a single custom sponsorship URL

‎README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,15 +477,19 @@ For an example see [shaxbee/go-spatialite](https://github.com/shaxbee/go-spatial
477477

478478
Why is it racy if I use a `sql.Open("sqlite3", ":memory:")` database?
479479

480-
Each connection to :memory: opens a brand new in-memory sql database, so if
480+
Each connection to `":memory:"` opens a brand new in-memory sql database, so if
481481
the stdlib's sql engine happens to open another connection and you've only
482-
specified ":memory:", that connection will see a brand new database. A
483-
workaround is to use "file::memory:?mode=memory&cache=shared". Every
484-
connection to this string will point to the same in-memory database.
482+
specified `":memory:"`, that connection will see a brand new database. A
483+
workaround is to use `"file::memory:?cache=shared"` (or `"file:foobar?mode=memory&cache=shared"`). Every
484+
connection to this string will point to the same in-memory database.
485+
486+
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.
485487

486488
For more information see
487489
* [#204](https://github.com/mattn/go-sqlite3/issues/204)
488490
* [#511](https://github.com/mattn/go-sqlite3/issues/511)
491+
* https://www.sqlite.org/sharedcache.html#shared_cache_and_in_memory_databases
492+
* https://www.sqlite.org/inmemorydb.html#sharedmemdb
489493

490494
- Reading from database with large amount of goroutines fails on OSX.
491495

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /