aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorGert-Jan Timmer <gjr.timmer@gmail.com>2018-05-29 13:23:39 +0200
committerGert-Jan Timmer <gjr.timmer@gmail.com>2018-05-29 13:23:39 +0200
commit9e79299c09fe7a6786b163be2b0abdab03a39d8b (patch)
treea171c0e599bccdf05d2f884612fc78dc9c540071 /sqlite3.go
parentADD: PRAGMA locking_mode (diff)
downloadgolite-9e79299c09fe7a6786b163be2b0abdab03a39d8b.tar.gz
golite-9e79299c09fe7a6786b163be2b0abdab03a39d8b.tar.xz
Add: Documentation for opening as Immutable
Diffstat (limited to '')
-rw-r--r--sqlite3.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/sqlite3.go b/sqlite3.go
index b0a330d..3e2d2e3 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -810,6 +810,15 @@ func errorString(err Error) string {
// - shared
// - private
//
+// immutable=Boolean
+// The immutable parameter is a boolean query parameter that indicates
+// that the database file is stored on read-only media. When immutable is set,
+// SQLite assumes that the database file cannot be changed,
+// even by a process with higher privilege,
+// and so the database is opened read-only and all locking and change detection is disabled.
+// Caution: Setting the immutable property on a database file that
+// does in fact change can result in incorrect query results and/or SQLITE_CORRUPT errors.
+//
// go-sqlite3 adds the following query parameters to those used by SQLite:
// _loc=XXX
// Specify location of time format. It's possible to specify "auto".