버튼에 제어 달기
This commit is contained in:
@@ -76,13 +76,13 @@ export class MySQLConnector implements DatabaseConnector {
|
||||
}
|
||||
}
|
||||
|
||||
async executeQuery(query: string): Promise<QueryResult> {
|
||||
async executeQuery(query: string, params: any[] = []): Promise<QueryResult> {
|
||||
if (!this.connection) {
|
||||
await this.connect();
|
||||
}
|
||||
|
||||
try {
|
||||
const [rows, fields] = await this.connection!.query(query);
|
||||
const [rows, fields] = await this.connection!.query(query, params);
|
||||
return {
|
||||
rows: rows as any[],
|
||||
rowCount: Array.isArray(rows) ? rows.length : 0,
|
||||
|
||||
Reference in New Issue
Block a user