fix: can't findOneAnotherKey

This commit is contained in:
Siwoo Jeon 2023-11-30 20:51:50 +09:00
parent 6fc1183148
commit c14250aa3a
Signed by: migan
GPG key ID: C4151385FFD2082A
4 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{
"name": "muffin-ai-arujak",
"version": "2.0.0-78-oreo",
"version": "2.0.0-79-oreo",
"main": "dist/index.js",
"private": true,
"dependencies": {

View file

@ -64,8 +64,8 @@ export class LearnTable implements BaseTable<LearnData, string> {
data: any,
): Promise<LearnData[]> {
const [rows] = await this._database.execute<LearnData[]>(
'SELECT * FROM learn WHERE ? = ?;',
[key, data],
`SELECT * FROM learn WHERE ${key} = ?;`,
[data],
)
return rows
}

View file

@ -60,8 +60,8 @@ export class NSFWContentTable implements BaseTable<NSFWData, number> {
data: any,
): Promise<NSFWData[]> {
const [rows] = await this._database.execute<NSFWData[]>(
'SELECT * FROM nsfw_content WHERE ? = ?;',
[key, data],
`SELECT * FROM nsfw_content WHERE ${key} = ?;`,
[data],
)
return rows
}

View file

@ -69,8 +69,8 @@ export class StatementTable implements BaseTable<ResponseData, number> {
data: any,
): Promise<ResponseData[]> {
const [rows] = await this._database.execute<ResponseData[]>(
'SELECT * FROM statement WHERE ? = ?;',
[key, data],
`SELECT * FROM statement WHERE ${key} = ?;`,
[data],
)
return rows
}