@open-xchange/fastify-sdk 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/database/mariadb.js +4 -3
- package/package.json +1 -1
package/lib/database/mariadb.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import mariadb from 'mariadb'
|
|
1
|
+
import * as mariadb from 'mariadb'
|
|
2
2
|
|
|
3
3
|
const defaults = {
|
|
4
4
|
dateStrings: ['DATE', 'DATETIME'],
|
|
5
5
|
timezone: '+00:00',
|
|
6
|
-
namedPlaceholders: true
|
|
6
|
+
namedPlaceholders: true,
|
|
7
|
+
connectTimeout: 10_000
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export function createMariaDBPool (options = {}) {
|
|
@@ -76,6 +77,6 @@ export function getMariaDBPools () {
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
export async function createUUID (pool) {
|
|
79
|
-
const [
|
|
80
|
+
const [{ uuid }] = await pool.query('SELECT uuid() as uuid')
|
|
80
81
|
return uuid
|
|
81
82
|
}
|