Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit 3ac2825

Browse files
fix: adapt to latest db-lib
1 parent 4b3f3b3 commit 3ac2825

File tree

5 files changed

+1192
-1149
lines changed

5 files changed

+1192
-1149
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
if: "!contains(github.event.head_commit.message, 'skip ci')"
1111
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
1212
steps:
13-
- { uses: actions/checkout@v2, with: { persist-credentials: true } }
14-
- { uses: actions/setup-node@v2, with: { node-version: 16, cache: 'yarn' } }
13+
- { uses: actions/checkout@v3, with: { persist-credentials: true } }
14+
- { uses: actions/setup-node@v3, with: { node-version: 16, cache: 'yarn' } }
1515

1616
# Cache for npm/npx in ~/.npm
17-
- uses: actions/cache@v2
17+
- uses: actions/cache@v3
1818
with:
1919
path: ~/.npm
2020
key: npm-v1-${{ runner.os }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"devDependencies": {
1414
"@naturalcycles/dev-lib": "^12.7.5",
1515
"@types/node": "^17.0.5",
16-
"dotenv": "^14.1.0",
16+
"dotenv": "^16.0.0",
1717
"jest": "^27.2.4"
1818
},
1919
"files": [

src/mysql.db.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class MysqlDB extends BaseCommonDB implements CommonDB {
176176
// GET
177177
override async getByIds<ROW extends ObjectWithId>(
178178
table: string,
179-
ids: string[],
179+
ids: ROW['id'][],
180180
opt: MysqlDBOptions = {},
181181
): Promise<ROW[]> {
182182
if (!ids.length) return []
@@ -290,7 +290,11 @@ export class MysqlDB extends BaseCommonDB implements CommonDB {
290290
/**
291291
* Limitation: always returns [], regardless of which rows are actually deleted
292292
*/
293-
override async deleteByIds(table: string, ids: string[], _opt?: MysqlDBOptions): Promise<number> {
293+
override async deleteByIds<ROW extends ObjectWithId>(
294+
table: string,
295+
ids: ROW['id'][],
296+
_opt?: MysqlDBOptions,
297+
): Promise<number> {
294298
if (!ids.length) return 0
295299
const sql = dbQueryToSQLDelete(new DBQuery(table).filterEq('id', ids))
296300
const res = await this.runSQL<any>({ sql })

src/test/getdb.manual.test.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)