mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
refactor(profiler): move from logger module
This commit is contained in:
1 parent
c38f646bb9
commit
35c6a9ee7f
5 files changed
+71
-55
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { logError, logQuery, profileBatchStatements, runProfiler } from '../logger';
|
||||
import { logError, logQuery } from '../logger';
|
||||
import { CFXCallback, CFXParameters, QueryType } from '../types';
|
||||
import { parseResponse } from '../utils/parseResponse';
|
||||
import { executeType, parseExecute } from '../utils/parseExecute';
|
||||
@@ -7,6 +7,7 @@ import { setCallback } from '../utils/setCallback';
|
||||
import { performance } from 'perf_hooks';
|
||||
import validateResultSet from 'utils/validateResultSet';
|
||||
import { RowDataPacket } from 'mysql2';
|
||||
import { profileBatchStatements, runProfiler } from 'profiler';
|
||||
|
||||
export const rawExecute = async (
|
||||
invokingResource: string,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { parseArguments } from '../utils/parseArguments';
|
||||
import { setCallback } from '../utils/setCallback';
|
||||
import { parseResponse } from '../utils/parseResponse';
|
||||
import { logQuery, logError, runProfiler } from '../logger';
|
||||
import { logQuery, logError } from '../logger';
|
||||
import type { CFXCallback, CFXParameters } from '../types';
|
||||
import type { QueryType } from '../types';
|
||||
import { getConnection } from './connection';
|
||||
import { RowDataPacket } from 'mysql2';
|
||||
import { performance } from 'perf_hooks';
|
||||
import validateResultSet from 'utils/validateResultSet';
|
||||
import { runProfiler } from 'profiler';
|
||||
|
||||
export const rawQuery = async (
|
||||
type: QueryType,
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { getConnection } from './connection';
|
||||
import { logError, logQuery, profileBatchStatements, runProfiler } from '../logger';
|
||||
import { logError, logQuery } from '../logger';
|
||||
import { CFXCallback, CFXParameters, TransactionQuery } from '../types';
|
||||
import { parseTransaction } from '../utils/parseTransaction';
|
||||
import { setCallback } from '../utils/setCallback';
|
||||
import { performance } from 'perf_hooks';
|
||||
import { profileBatchStatements, runProfiler } from 'profiler';
|
||||
|
||||
const transactionError = (queries: { query: string; params?: CFXParameters }[], parameters: CFXParameters) => {
|
||||
`${queries.map((query) => `${query.query} ${JSON.stringify(query.params || [])}`).join('\n')}\n${JSON.stringify(
|
||||
|
||||
Reference in new issue
Block a user