Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fxjs/db-driver

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fxjs/db-driver - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1-alpha.0

codepoints-map.json

9

lib/built-ins/driver-postgresql.js

@@ -6,2 +6,7 @@ /// <reference types="fib-pool" />

const utils_1 = require("../utils");
const CodepointsList = require('../../codepoints-map.json');
const CodepointsMap = CodepointsList.reduce((accu, item) => {
accu[item.codepoint] = item;
return accu;
}, {});
const win32CpInfo = utils_1.detectWindowsCodePoints();

@@ -28,2 +33,3 @@ class PostgreSQLDriver extends base_class_1.SQLDriver {

const conn = super.open();
const matchedCodepoint = CodepointsMap[win32CpInfo.codepoints];
// TODO: support common codepoints -> postgresql-encoding

@@ -33,2 +39,5 @@ if (conn.codec && win32CpInfo.codepoints === '936') {

}
else if (conn.codec && matchedCodepoint) {
conn.codec = matchedCodepoint.dotNetName;
}
else if (conn.codec === 'utf8' && win32CpInfo.codepoints !== '65001') {

@@ -35,0 +44,0 @@ console.error(`system default code points is '${win32CpInfo.codepoints}', but odbc try to use codec UTF8 with codepoints 65001, refer to https://learn.microsoft.com/en-us/windows/win32/intl/code-page-identifiers to set connection.codec as UTF8`);

7

package.json
{
"name": "@fxjs/db-driver",
"version": "0.5.0",
"version": "0.5.1-alpha.0",
"description": "",

@@ -55,3 +55,4 @@ "keywords": [

"lib",
"typings"
"typings",
"codepoints-map.json"
],

@@ -61,3 +62,3 @@ "publishConfig": {

},
"gitHead": "802d2e1def54ea48febbe436caae2f8e4f5959b5"
"gitHead": "1100c3d4a54a46d59d7c191d9d593c0ea640ac3b"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc