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
+32-2Lines changed: 32 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,15 @@ Supported Golang version:
19
19
20
20
-[Installation](#installation)
21
21
-[API Reference](#api-reference)
22
+
-[Connection String](#connection-string)
22
23
-[Features](#features)
23
24
-[Compilation](#compilation)
24
25
-[Android](#android)
25
26
-[ARM](#arm)
26
27
-[Cross Compile](#cross-compile)
27
-
-[Docker](#docker)
28
-
-[Alpine](#alpine)
29
28
-[Google Cloud Platform](#google-cloud-platform)
30
29
-[Linux](#linux)
30
+
-[Alpine](#alpine)
31
31
-[Fedora](#fedora)
32
32
-[Ubuntu](#ubuntu)
33
33
-[Mac OSX](#mac-osx)
@@ -54,6 +54,36 @@ API documentation can be found here: http://godoc.org/github.com/mattn/go-sqlite
54
54
55
55
Examples can be found under the [examples](./_example) directory
56
56
57
+
# Connection String
58
+
59
+
When creating a new SQLite database or connection to an existing one, with the file name additional options can be given.
60
+
This is also known as a DSN string. (Data Source Name).
61
+
62
+
Options are append after the filename of the SQLite database.
63
+
The database filename and options are seperated by an `?` (Question Mark).
64
+
65
+
This also applies when using an in-memory database instead of a file.
66
+
67
+
Options can be given using the following format: `KEYWORD=VALUE` and multiple options can be combined with the `&` ampersand.
68
+
69
+
This library supports dsn options of SQLite itself and provides additional options.
70
+
71
+
| Name | Key | Value(s) | Description |
72
+
|------|-----|----------|-------------|
73
+
| Shared-Cache Mode | cache | <ul><li>shared</li><li>private</li></ul> | Set cache mode for more information see [sqlite.org](https://www.sqlite.org/sharedcache.html)|
74
+
| Time Zone Location |_loc | auto | Specify location of time format. |
75
+
| Busy Timeout |_busy_timeout |`int`| Specify value for sqlite3_busy_timeout. |
This package allows additional configuration of features available within SQLite3 to be enabled or disabled by golang build constraints also known as build `tags`.
0 commit comments