pecko0326
pecko0326
Explore posts from servers
DTDrizzle Team
Created by pecko0326 on 8/9/2024 in #help
MySQL Driver keeps asking for 'password' parameter
As it was mentioned in another post, setting a password for your local MySQL root user and reading that password in the configuration file, seems to be working fine. This is some edge case I guess.
2 replies
DTDrizzle Team
Created by pecko0326 on 3/14/2024 in #help
How to delete multiple rows whose value is contained in a list of values, at once?
EDIT: Nevermind, found the reason for the issue. Turns out that I didn't have to wrap the list of keys that I want to check against in parenthesis. So this:
await db
.delete(exampleTable)
.where(sql`${exampleTable.key} IN (${keysToDelete})`);
await db
.delete(exampleTable)
.where(sql`${exampleTable.key} IN (${keysToDelete})`);
should become this:
await db
.delete(exampleTable)
.where(sql`${exampleTable.key} IN ${keysToDelete}`);
await db
.delete(exampleTable)
.where(sql`${exampleTable.key} IN ${keysToDelete}`);
Lost way more time than I intended to on this 🙂
2 replies