forked from mirror/go-sqlite3
parent
bb42c28ba5
commit
4ab48f1935
|
@ -79,7 +79,7 @@ Boolean values can be one of:
|
|||
| Case Sensitive LIKE | `_cslike` | `boolean` | For more information see [PRAGMA case_sensitive_like](https://www.sqlite.org/pragma.html#pragma_case_sensitive_like) |
|
||||
| Foreign Keys | `_foreign_keys` \| `_fk` | `boolean` | For more information see [PRAGMA foreign_keys](https://www.sqlite.org/pragma.html#pragma_foreign_keys) |
|
||||
| Mutex Locking | `_mutex` | <ul><li>no</li><li>full</li></ul> | Specify mutex mode. |
|
||||
| Recursive Triggers | `_recursive_triggers` | `boolean` | For more information see [PRAGMA recursive_triggers](https://www.sqlite.org/pragma.html#pragma_recursive_triggers) |
|
||||
| Recursive Triggers | `_recursive_triggers` \| `_rt` | `boolean` | For more information see [PRAGMA recursive_triggers](https://www.sqlite.org/pragma.html#pragma_recursive_triggers) |
|
||||
| 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) |
|
||||
| Time Zone Location | `_loc` | auto | Specify location of time format. |
|
||||
| Transaction Lock | `_txlock` | <ul><li>immediate</li><li>deferred</li><li>exclusive</li></ul> | Specify locking behavior for transactions. |
|
||||
|
|
|
@ -961,7 +961,14 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
|||
//
|
||||
// https://www.sqlite.org/pragma.html#pragma_recursive_triggers
|
||||
//
|
||||
if val := params.Get("_recursive_triggers"); val != "" {
|
||||
pkey = "" // Reset pkey
|
||||
if _, ok := params["_recursive_triggers"]; ok {
|
||||
pkey = "_recursive_triggers"
|
||||
}
|
||||
if _, ok := params["_rt"]; ok {
|
||||
pkey = "_rt"
|
||||
}
|
||||
if val := params.Get(pkey); val != "" {
|
||||
switch strings.ToLower(val) {
|
||||
case "0", "no", "false", "off":
|
||||
recursiveTriggers = 0
|
||||
|
|
Loading…
Reference in New Issue