0xRaptor
0xRaptor
Explore posts from servers
DTDrizzle Team
Created by 0xRaptor on 1/1/2024 in #help
Syntax Error
Error:
DatabaseError: syntax error at position 92 near 'where'
at Connection.execute (file:///F:/MELONLY/cron/node_modules/@planetscale/database/dist/index.js:78:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async updateShift (file:///F:/MELONLY/cron/dist/database.js:202:5)
at async endShift (file:///F:/MELONLY/cron/dist/crons/erlc-shifts-end.js:61:5)
at async default (file:///F:/MELONLY/cron/dist/crons/erlc-shifts-end.js:46:36)
at async CJ.<anonymous> (file:///F:/MELONLY/cron/dist/index.js:22:25) {
status: 400,
body: {
message: "syntax error at position 92 near 'where'",
code: 'UNKNOWN'
}
}
DatabaseError: syntax error at position 92 near 'where'
at Connection.execute (file:///F:/MELONLY/cron/node_modules/@planetscale/database/dist/index.js:78:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async updateShift (file:///F:/MELONLY/cron/dist/database.js:202:5)
at async endShift (file:///F:/MELONLY/cron/dist/crons/erlc-shifts-end.js:61:5)
at async default (file:///F:/MELONLY/cron/dist/crons/erlc-shifts-end.js:46:36)
at async CJ.<anonymous> (file:///F:/MELONLY/cron/dist/index.js:22:25) {
status: 400,
body: {
message: "syntax error at position 92 near 'where'",
code: 'UNKNOWN'
}
}
Code:
export const updateShift = async (shiftId: string, data: Partial<Shift>) => {
await db.update(shifts).set(data).where(eq(shifts.id, shiftId))
};
export const updateShift = async (shiftId: string, data: Partial<Shift>) => {
await db.update(shifts).set(data).where(eq(shifts.id, shiftId))
};
16 replies