diff options
author | Gert-Jan Timmer <gjr.timmer@gmail.com> | 2018-05-29 12:03:18 +0200 |
---|---|---|
committer | Gert-Jan Timmer <gjr.timmer@gmail.com> | 2018-05-29 12:03:18 +0200 |
commit | 4ab48f193516239cd4d3fc42769d41c078990348 (patch) | |
tree | 1ebacc85434a70d400889eb0797ee504297b5396 | |
parent | Fix: pkey (diff) | |
download | golite-4ab48f193516239cd4d3fc42769d41c078990348.tar.gz golite-4ab48f193516239cd4d3fc42769d41c078990348.tar.xz |
Update Recursive Triggers
ADD: Multiple Key
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | sqlite3.go | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -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 |