fix: can't findOneAnotherKey
This commit is contained in:
parent
6fc1183148
commit
c14250aa3a
4 changed files with 7 additions and 7 deletions
|
@ -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": {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue