mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
SQL: Support turning SQL.Statements to JSON
This commit is contained in:
parent
caeb7e524e
commit
0a2ed42d13
|
|
@ -76,6 +76,9 @@ export class Statement {
|
|||
toString() {
|
||||
return this.statement;
|
||||
}
|
||||
toJSON() {
|
||||
return this.statement;
|
||||
}
|
||||
}
|
||||
|
||||
export class SQLDatabaseManager extends QueryProcessManager<DatabaseQuery, any> {
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ export class Modlog {
|
|||
|
||||
const duration = Date.now() - startTime;
|
||||
if (duration > LONG_QUERY_DURATION) {
|
||||
Monitor.slow(`[slow SQL modlog search] ${duration}ms - ${JSON.stringify({...query, statement: query.statement.toString()})}`);
|
||||
Monitor.slow(`[slow SQL modlog search] ${duration}ms - ${JSON.stringify(query)}`);
|
||||
}
|
||||
return {results, duration};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user