diff options
author | Gert-Jan Timmer <gjr.timmer@gmail.com> | 2018-05-29 13:23:39 +0200 |
---|---|---|
committer | Gert-Jan Timmer <gjr.timmer@gmail.com> | 2018-05-29 13:23:39 +0200 |
commit | 9e79299c09fe7a6786b163be2b0abdab03a39d8b (patch) | |
tree | a171c0e599bccdf05d2f884612fc78dc9c540071 | |
parent | ADD: PRAGMA locking_mode (diff) | |
download | golite-9e79299c09fe7a6786b163be2b0abdab03a39d8b.tar.gz golite-9e79299c09fe7a6786b163be2b0abdab03a39d8b.tar.xz |
Add: Documentation for opening as Immutable
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | sqlite3.go | 9 |
2 files changed, 10 insertions, 0 deletions
@@ -80,6 +80,7 @@ Boolean values can be one of: | Defer Foreign Keys | `_defer_foreign_keys` \| `_defer_fk` | `boolean` | For more information see [PRAGMA defer_foreign_keys](https://www.sqlite.org/pragma.html#pragma_defer_foreign_keys) | | Foreign Keys | `_foreign_keys` \| `_fk` | `boolean` | For more information see [PRAGMA foreign_keys](https://www.sqlite.org/pragma.html#pragma_foreign_keys) | | Ignore CHECK Constraints | `_ignore_check_constraints` | `boolean` | For more information see [PRAGMA ignore_check_constraints](https://www.sqlite.org/pragma.html#pragma_ignore_check_constraints) | +| Immutable | `immutable` | `boolean` | For more information see [Immutable](https://www.sqlite.org/c3ref/open.html) | | Journal Mode | `_journal` | <ul><li>DELETE</li><li>TRUNCATE</li><li>PERSIST</li><li>MEMORY</li><li>WAL</li><li>OFF</li></ul> | For more information see [PRAGMA journal_mode](https://www.sqlite.org/pragma.html#pragma_journal_mode) | | Locking Mode | `_locking` | <ul><li>NORMAL</li><li>EXCLUSIVE</li></ul> | For more information see [PRAGMA locking_mode](https://www.sqlite.org/pragma.html#pragma_locking_mode) | | Mode | `mode` | <ul><li>ro</li><li>rw</li><li>rwc</li><li>memory</li></ul> | Access Mode of the database. For more information see [SQLite Open](https://www.sqlite.org/c3ref/open.html) | @@ -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". |