feat(MySQL Node): Return decimal types as numbers (#10313)
This commit is contained in:
@@ -24,6 +24,7 @@ export async function createPool(
|
||||
password: credentials.password,
|
||||
multipleStatements: true,
|
||||
supportBigNumbers: true,
|
||||
decimalNumbers: false,
|
||||
};
|
||||
|
||||
if (credentials.ssl) {
|
||||
@@ -55,6 +56,10 @@ export async function createPool(
|
||||
connectionOptions.bigNumberStrings = true;
|
||||
}
|
||||
|
||||
if (options?.decimalNumbers === true) {
|
||||
connectionOptions.decimalNumbers = true;
|
||||
}
|
||||
|
||||
if (!credentials.sshTunnel) {
|
||||
return mysql2.createPool(connectionOptions);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user