@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/db/index.ts +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuboapp/database",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Database methods",
5
5
  "main": "src/index.ts",
6
6
  "repository": "git@cuboapp.gitlab.yandexcloud.net:cubo/database.git",
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(private connectOptions: Options, private otherOptions?: DatabaseOptions) {}
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 res as T[]
160
+ return result as unknown as T[]
158
161
  }
159
162
  }
160
163
  }