You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -458,17 +458,55 @@ Each of these properties is explained below:
458
458
459
459
### 3.4 Raw Query Method
460
460
461
-
`rawQuery` method is the most powerful method among all, unlike other methods that are limited to the base mapping, this method is not tied to any particular table, but utilizes the connection pool to execute queries on that database itself. It is capable of executing any and all types of queries including DDL, DMLetc. It supports normal queries as well as placeholders:
462
-
- In `mysql`:
463
-
- Positional placeholders:`??`, `?`,
464
-
- Named placeholders:`:namedVariable`,
465
-
- user defined variables:`@userVariable`,
466
-
- In `postgresql`:
467
-
- Positional placeholder:`$1`, `$2`, `$3`...
468
-
- In `sqlite`:
469
-
- Positional placeholder:`?`,
470
-
- Named placeholders:`:namedVariable` or `$namedVariable` or `@namedVariable`,
471
-
- Indexed placeholder:`$1`, `$2`, `$3`... or `?1`, `?2`, `?3`...
461
+
`rawQuery` method is the most powerful method among all, unlike other methods that are limited to the base mapping, this method is not tied to any particular table, but utilizes the connection pool to execute queries on that database itself. It is capable of executing any and all types of queries including **DDL, DML etc** (In `sqlite`, set `methodType: 'exec'`).
462
+
463
+
It supports various types ofmethods (as mentioned below) for`mysql` and `sqlite`, each method has specific capabilities:
UnSQL uses `#` as prefix to identify if string is plain text, or column name if string does not start with`#`.
1532
1570
1571
+
### 7.2 What will happen if secret/iv/sha is defined inside config, encryption and decrypt/encrypt property?
1572
+
1573
+
When configurations like `secret`|`iv`|`sha` are declared in all places, `encryption` at method level will override `encryption` at `config`, similarly `decrypt`/`encrypt` inside special object will override all other.
* @param {Object} [rawQueryParams.session] (optional) global session reference for transactions and rollback
365
-
* @param {'run'|'all'|'exec'} [rawQueryParams.methodType=all] (optional) used only with 'sqlite'
365
+
* @param {'run'|'all'|'exec'|'execute'|'query'} [rawQueryParams.methodType=all] (optional) used only with 'sqlite'
366
366
* @returns {Promise<{success:boolean, error?:object, result?:object}>} Promise resolving with two parameters: boolean 'success' and either 'error' or 'result'
* @returns {Promise<{success:false, error:*}|{success:true, result:*}>} Promise resolving with two parameters: boolean 'success' and either 'error' or 'results'
0 commit comments