mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
feat(utils/validateResultSet): add warning for oversized result sets
This behaviour is generally undesirable and may lead to excessive memory use or crashes.
This commit is contained in:
1 parent
7b488f8ad2
commit
691ee508d1
3 files changed
+28
No files matched your search
@@ -7,6 +7,7 @@ import type { QueryType } from '../types';
|
||||
import { getPoolConnection } from './connection';
|
||||
import { RowDataPacket } from 'mysql2';
|
||||
import { performance } from 'perf_hooks';
|
||||
import validateResultSet from 'utils/validateResultSet';
|
||||
|
||||
export const rawQuery = async (
|
||||
type: QueryType,
|
||||
@@ -43,6 +44,8 @@ export const rawQuery = async (
|
||||
logQuery(invokingResource, query, performance.now() - startTime, parameters);
|
||||
}
|
||||
|
||||
validateResultSet(invokingResource, query, result);
|
||||
|
||||
if (!cb) return parseResponse(type, result);
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user