parent
d31a44a0bd
commit
578beef531
20
README.md
20
README.md
|
@ -37,7 +37,6 @@ Supported Golang version:
|
||||||
- [User Authentication](#user-authentication)
|
- [User Authentication](#user-authentication)
|
||||||
- [Compile](#compile)
|
- [Compile](#compile)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
-
|
|
||||||
- [Extensions](#extensions)
|
- [Extensions](#extensions)
|
||||||
- [Spatialite](#spatialite)
|
- [Spatialite](#spatialite)
|
||||||
- [FAQ](#faq)
|
- [FAQ](#faq)
|
||||||
|
@ -478,6 +477,25 @@ For an example see [shaxbee/go-spatialite](https://github.com/shaxbee/go-spatial
|
||||||
|
|
||||||
More infomation see [#305](https://github.com/mattn/go-sqlite3/issues/305)
|
More infomation see [#305](https://github.com/mattn/go-sqlite3/issues/305)
|
||||||
|
|
||||||
|
- Error: `database is locked`
|
||||||
|
|
||||||
|
When you get an database is locked. Please use the following options.
|
||||||
|
|
||||||
|
Add to DSN: `cache=shared`
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```go
|
||||||
|
db, err := sql.Open("sqlite3", "file:locked.sqlite?cache=shared")
|
||||||
|
```
|
||||||
|
|
||||||
|
Second please set the database connections of the SQL package to 1.
|
||||||
|
|
||||||
|
```go
|
||||||
|
db.SetMaxOpenConn(1)
|
||||||
|
```
|
||||||
|
|
||||||
|
More information see [#209](https://github.com/mattn/go-sqlite3/issues/209)
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
MIT: http://mattn.mit-license.org/2018
|
MIT: http://mattn.mit-license.org/2018
|
||||||
|
|
Loading…
Reference in New Issue