Skip to content

Commit

Permalink
fix(updated_at): add default column name for updated_at if not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
djMax committed Jan 13, 2024
1 parent c16374a commit 5b7e017
Showing 3 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -73,9 +73,9 @@
"pg-cursor": "^2.10.3",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vitest": "^1.1.3"
"vitest": "^1.2.0"
},
"dependencies": {
"@clickhouse/client": "^0.2.7"
"@clickhouse/client": "^0.2.8"
}
}
2 changes: 1 addition & 1 deletion src/dbs/kysely.ts
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ export async function syncTable<
getRows(bookmark, limit) {
type TableWhere = Parameters<typeof baseQuery['where']>;
const pkColumn = spec.pk as unknown as TableWhere[0];
const udColumn = spec.updatedCol as unknown as TableWhere[0];
const udColumn = (spec.updatedCol || 'updated_at') as unknown as TableWhere[0];
let completeQuery = baseQuery
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.where(udColumn, '<', sql<any>`NOW() - INTERVAL \'1 SECOND\' * ${spec.delaySeconds}`)
96 changes: 48 additions & 48 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -40,19 +40,19 @@ __metadata:
languageName: node
linkType: hard

"@clickhouse/client-common@npm:0.2.7":
version: 0.2.7
resolution: "@clickhouse/client-common@npm:0.2.7"
checksum: 6f213a4a0cb053c54a8d4dfded34c81de6583af06e62b4156d7d16b688608a02bfa627f3a363ad2c8d30615005a785887dbff980185909f20b039ab6fc1cbaeb
"@clickhouse/client-common@npm:0.2.8":
version: 0.2.8
resolution: "@clickhouse/client-common@npm:0.2.8"
checksum: 7b795e1765ba648fa4e2f5dd5bca5afad66342f6cac0d376a1a4764c4f87fc39e3bf10a6d656e3802e784c65dbddaddae47dc24a231a0aae6c58a95b6840cb12
languageName: node
linkType: hard

"@clickhouse/client@npm:^0.2.7":
version: 0.2.7
resolution: "@clickhouse/client@npm:0.2.7"
"@clickhouse/client@npm:^0.2.8":
version: 0.2.8
resolution: "@clickhouse/client@npm:0.2.8"
dependencies:
"@clickhouse/client-common": 0.2.7
checksum: 8deef89cf92b7e3cfa7c27d2fb99cd56ad264b40a0289e4f93edc0dfb441dc1e709177ae5014f5004be6da5a751d14f9e341f30ba23fca36734c693bc3ca6092
"@clickhouse/client-common": 0.2.8
checksum: 8fff646723060e0f19280f3899a6488e4cc87f44c9520cd0b483a82fe08563827418e199ca67906686118f63a635da30f627190ee5d61137a8d1387ba0e13343
languageName: node
linkType: hard

@@ -672,7 +672,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@sesamecare-oss/to-clickhouse@workspace:."
dependencies:
"@clickhouse/client": ^0.2.7
"@clickhouse/client": ^0.2.8
"@openapi-typescript-infra/coconfig": ^4.3.0
"@semantic-release/exec": ^6.0.3
"@semantic-release/github": ^9.2.6
@@ -692,7 +692,7 @@ __metadata:
pg-cursor: ^2.10.3
ts-node: ^10.9.2
typescript: ^5.3.3
vitest: ^1.1.3
vitest: ^1.2.0
dependenciesMeta:
kysely:
optional: true
@@ -936,57 +936,57 @@ __metadata:
languageName: node
linkType: hard

"@vitest/expect@npm:1.1.3":
version: 1.1.3
resolution: "@vitest/expect@npm:1.1.3"
"@vitest/expect@npm:1.2.0":
version: 1.2.0
resolution: "@vitest/expect@npm:1.2.0"
dependencies:
"@vitest/spy": 1.1.3
"@vitest/utils": 1.1.3
"@vitest/spy": 1.2.0
"@vitest/utils": 1.2.0
chai: ^4.3.10
checksum: 971492347e91af81a8c309bc6dff4369afe0f533ac73a73e4a568111ea0fa7d6dc45b69b209490ad588578fd905773e6bd4fcbe8d517ac7aeb57efb1e9c59083
checksum: 591027d67b1006e6d9fb431dab8c2d43e4005353eea466bcafcc98303d31dc7b2f2562b24bb75ba9a5d62143a3b1fb7987c8f8b6244155752118c2c9382b6be0
languageName: node
linkType: hard

"@vitest/runner@npm:1.1.3":
version: 1.1.3
resolution: "@vitest/runner@npm:1.1.3"
"@vitest/runner@npm:1.2.0":
version: 1.2.0
resolution: "@vitest/runner@npm:1.2.0"
dependencies:
"@vitest/utils": 1.1.3
"@vitest/utils": 1.2.0
p-limit: ^5.0.0
pathe: ^1.1.1
checksum: a2875fab07c307aee5c7b3e4e821c2f36a561d86412edeb69f47daed10fa26fb5ba222841cf093372bce95a7384ff3a9302d69b3e594468aa565cbd5b2fe4316
checksum: fdb13c49a8c78d5eddf4119e55966f6681c3038421252f3ad4bd3302d4d9f686c8da37a80cd0c77ee2268b1a3c8253a22379dfb19ea3248563f174a32680ad9b
languageName: node
linkType: hard

"@vitest/snapshot@npm:1.1.3":
version: 1.1.3
resolution: "@vitest/snapshot@npm:1.1.3"
"@vitest/snapshot@npm:1.2.0":
version: 1.2.0
resolution: "@vitest/snapshot@npm:1.2.0"
dependencies:
magic-string: ^0.30.5
pathe: ^1.1.1
pretty-format: ^29.7.0
checksum: 731af9f71f57c0a4830a2e8c6c9c354fe80b7ad00d38cd19354aaa61c1e0353a3d09b427f2a69e81b5bccce4576e2c1e8a538bce3dfbbdc080126d23ee2edb14
checksum: 9af819d67c04c88909446ba2c7b6b941ddccbe3587dadc2d032b09f2434eb24342c51ea0e89b0e298b1a9a5426c846d1b8e1d2e72ae636ec13a1425a058bd9d4
languageName: node
linkType: hard

"@vitest/spy@npm:1.1.3":
version: 1.1.3
resolution: "@vitest/spy@npm:1.1.3"
"@vitest/spy@npm:1.2.0":
version: 1.2.0
resolution: "@vitest/spy@npm:1.2.0"
dependencies:
tinyspy: ^2.2.0
checksum: 592a9a2bad31c2655fdc6ae87f44b36bc25aafb7efd3a750228409ab4e98bff31888d806c29c6e7bfc029a5ee225f7dc998565115b4fa452429eaa579cc0eec7
checksum: 6b627b4d15a4f20998873f221184f39fed73d368d8aa17ce7b7fccc4e78c20f2a42dd6ed006b1f5c23ee00466441b0b81d2c999cdb99f5326f25ba91fb6583c9
languageName: node
linkType: hard

"@vitest/utils@npm:1.1.3":
version: 1.1.3
resolution: "@vitest/utils@npm:1.1.3"
"@vitest/utils@npm:1.2.0":
version: 1.2.0
resolution: "@vitest/utils@npm:1.2.0"
dependencies:
diff-sequences: ^29.6.3
estree-walker: ^3.0.3
loupe: ^2.3.7
pretty-format: ^29.7.0
checksum: d345b8c862c51b734d9fe53397a125485797cae2a4c1630cea1235f3f0987df479c84ac958f5250e77892afdc12f6d863628d619fc1bb5e34c05c3fa8a86d289
checksum: ac17b2357366d6ce66efec3788262cb64cd5fcc4043b09a1b060b37ae4626d68577ef493f1b6e66b2bc0c551f1a9640ecf052aefef96fb0ef704bb56c23f636d
languageName: node
linkType: hard

@@ -4918,9 +4918,9 @@ __metadata:
languageName: node
linkType: hard

"vite-node@npm:1.1.3":
version: 1.1.3
resolution: "vite-node@npm:1.1.3"
"vite-node@npm:1.2.0":
version: 1.2.0
resolution: "vite-node@npm:1.2.0"
dependencies:
cac: ^6.7.14
debug: ^4.3.4
@@ -4929,7 +4929,7 @@ __metadata:
vite: ^5.0.0
bin:
vite-node: vite-node.mjs
checksum: 077691a293fb4151267d7bb4ed322e3d4ce427bd06c02f7d08d7411f9fc96f98ada1aa0da172c02648b44680ba16c57a40b1aa9b98231f68ea5862a00dcdb1dd
checksum: 18d1dfb8c4a5f926dd8089592634414b26b4a0bbcae4fd5f7f6bf336db14fcc1405481bdd70bdd5bcce25b71b38a0617b7688edf8a5463835920e3fe13e9b917
languageName: node
linkType: hard

@@ -4973,15 +4973,15 @@ __metadata:
languageName: node
linkType: hard

"vitest@npm:^1.1.3":
version: 1.1.3
resolution: "vitest@npm:1.1.3"
"vitest@npm:^1.2.0":
version: 1.2.0
resolution: "vitest@npm:1.2.0"
dependencies:
"@vitest/expect": 1.1.3
"@vitest/runner": 1.1.3
"@vitest/snapshot": 1.1.3
"@vitest/spy": 1.1.3
"@vitest/utils": 1.1.3
"@vitest/expect": 1.2.0
"@vitest/runner": 1.2.0
"@vitest/snapshot": 1.2.0
"@vitest/spy": 1.2.0
"@vitest/utils": 1.2.0
acorn-walk: ^8.3.1
cac: ^6.7.14
chai: ^4.3.10
@@ -4996,7 +4996,7 @@ __metadata:
tinybench: ^2.5.1
tinypool: ^0.8.1
vite: ^5.0.0
vite-node: 1.1.3
vite-node: 1.2.0
why-is-node-running: ^2.2.2
peerDependencies:
"@edge-runtime/vm": "*"
@@ -5020,7 +5020,7 @@ __metadata:
optional: true
bin:
vitest: vitest.mjs
checksum: 35087400a0e2b2f0f1f451d0da41abafd8c55112e143a2643286bf0d3d4567b057b40dc391c4b2a05a947edc48d981a6b8c961dc32c6642d84cd8d717bd168bc
checksum: eb275607d71d5b101149988204af1f4205cec617bf0f8a1690c68f3f78634256f9a706b409710d258b375d54e6bcc5511b3861b5ae301965701c2849e4e80d0d
languageName: node
linkType: hard

0 comments on commit 5b7e017

Please sign in to comment.