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",
|
"name": "muffin-ai-arujak",
|
||||||
"version": "2.0.0-78-oreo",
|
"version": "2.0.0-79-oreo",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -64,8 +64,8 @@ export class LearnTable implements BaseTable<LearnData, string> {
|
||||||
data: any,
|
data: any,
|
||||||
): Promise<LearnData[]> {
|
): Promise<LearnData[]> {
|
||||||
const [rows] = await this._database.execute<LearnData[]>(
|
const [rows] = await this._database.execute<LearnData[]>(
|
||||||
'SELECT * FROM learn WHERE ? = ?;',
|
`SELECT * FROM learn WHERE ${key} = ?;`,
|
||||||
[key, data],
|
[data],
|
||||||
)
|
)
|
||||||
return rows
|
return rows
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,8 +60,8 @@ export class NSFWContentTable implements BaseTable<NSFWData, number> {
|
||||||
data: any,
|
data: any,
|
||||||
): Promise<NSFWData[]> {
|
): Promise<NSFWData[]> {
|
||||||
const [rows] = await this._database.execute<NSFWData[]>(
|
const [rows] = await this._database.execute<NSFWData[]>(
|
||||||
'SELECT * FROM nsfw_content WHERE ? = ?;',
|
`SELECT * FROM nsfw_content WHERE ${key} = ?;`,
|
||||||
[key, data],
|
[data],
|
||||||
)
|
)
|
||||||
return rows
|
return rows
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,8 @@ export class StatementTable implements BaseTable<ResponseData, number> {
|
||||||
data: any,
|
data: any,
|
||||||
): Promise<ResponseData[]> {
|
): Promise<ResponseData[]> {
|
||||||
const [rows] = await this._database.execute<ResponseData[]>(
|
const [rows] = await this._database.execute<ResponseData[]>(
|
||||||
'SELECT * FROM statement WHERE ? = ?;',
|
`SELECT * FROM statement WHERE ${key} = ?;`,
|
||||||
[key, data],
|
[data],
|
||||||
)
|
)
|
||||||
return rows
|
return rows
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue