Skip to content

Commit 46fb688

Browse files
committed
Update README
ADD: Comments for SQLite Access Mode ADD: Comments for SQLite Shared-Cache Mode UPD: README * Add Access Mode in Connection String Table
1 parent a5150a8 commit 46fb688

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Boolean values can be one of:
8080
| 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) |
8181
| Foreign Keys | `_foreign_keys` \| `_fk` | `boolean` | For more information see [PRAGMA foreign_keys](https://www.sqlite.org/pragma.html#pragma_foreign_keys) |
8282
| 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) |
83+
| 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) |
8384
| Mutex Locking | `_mutex` | <ul><li>no</li><li>full</li></ul> | Specify mutex mode. |
8485
| Recursive Triggers | `_recursive_triggers` \| `_rt` | `boolean` | For more information see [PRAGMA recursive_triggers](https://www.sqlite.org/pragma.html#pragma_recursive_triggers) |
8586
| 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) |

sqlite3.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,23 @@ func errorString(err Error) string {
793793
// file:test.db?cache=shared&mode=memory
794794
// :memory:
795795
// file::memory:
796+
//
797+
// mode
798+
// Access mode of the database.
799+
// https://www.sqlite.org/c3ref/open.html
800+
// Values:
801+
// - ro
802+
// - rw
803+
// - rwc
804+
// - memory
805+
//
806+
// shared
807+
// SQLite Shared-Cache Mode
808+
// https://www.sqlite.org/sharedcache.html
809+
// Values:
810+
// - shared
811+
// - private
812+
//
796813
// go-sqlite3 adds the following query parameters to those used by SQLite:
797814
// _loc=XXX
798815
// Specify location of time format. It's possible to specify "auto".

0 commit comments

Comments
 (0)