Comparing version 37.2.1 to 37.3.0
@@ -5,5 +5,9 @@ "use strict"; | ||
const createMockQueryResult = (rows) => { | ||
let fields = []; | ||
if (rows.length > 0) { | ||
fields = Object.keys(rows[0]).map((it) => ({ dataTypeId: 0, name: it })); | ||
} | ||
return { | ||
command: 'SELECT', | ||
fields: [], | ||
fields, | ||
notices: [], | ||
@@ -10,0 +14,0 @@ rowCount: rows.length, |
@@ -102,3 +102,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "37.2.1" | ||
"version": "37.3.0" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { type QueryResult, type QueryResultRow } from '../types'; | ||
import { type Field, type QueryResult, type QueryResultRow } from '../types'; | ||
@@ -6,5 +6,10 @@ export const createMockQueryResult = ( | ||
): QueryResult<QueryResultRow> => { | ||
let fields: Field[] = []; | ||
if (rows.length > 0) { | ||
fields = Object.keys(rows[0]).map((it) => ({ dataTypeId: 0, name: it })); | ||
} | ||
return { | ||
command: 'SELECT', | ||
fields: [], | ||
fields, | ||
notices: [], | ||
@@ -11,0 +16,0 @@ rowCount: rows.length, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
513291
7443