@cuboapp/database 1.0.5 → 1.0.6
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/package.json +1 -1
- package/src/db/index.ts +5 -2
package/package.json
CHANGED
package/src/db/index.ts
CHANGED
|
@@ -10,7 +10,10 @@ export * from './utils'
|
|
|
10
10
|
export class Database {
|
|
11
11
|
public connection: Sequelize
|
|
12
12
|
|
|
13
|
-
constructor(
|
|
13
|
+
constructor(
|
|
14
|
+
private connectOptions: Options,
|
|
15
|
+
private otherOptions?: DatabaseOptions
|
|
16
|
+
) {}
|
|
14
17
|
|
|
15
18
|
public async connect() {
|
|
16
19
|
const opts: Options = {
|
|
@@ -154,7 +157,7 @@ export class Database {
|
|
|
154
157
|
|
|
155
158
|
return res[0].map((r) => (!!pkKey ? (pkType === 'number' ? +r[pkKey] : r[pkKey]) : r)) as T[]
|
|
156
159
|
case 'mysql':
|
|
157
|
-
return
|
|
160
|
+
return result as unknown as T[]
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
}
|