Socket
Socket
Sign inDemoInstall

tedious

Package Overview
Dependencies
Maintainers
8
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tedious - npm Package Compare versions

Comparing version 11.3.0 to 11.3.1

24

lib/bulk-load.js

@@ -144,16 +144,2 @@ "use strict";

/**
* Escape an identifier according to SQL Server identifier naming rules.
*
* Does not perform validation of the identifier, only escapes the characters so it can safely be embedded into a
* T-SQL statement.
*
* @param identifier a table name, column name, etc.
* @returns the escaped identifier
*/
function escapeIdentifier(identifier) {
return `"${identifier.replace(/"/g, '""')}"`;
}
/**
* A BulkLoad instance is used to perform a bulk insert.

@@ -483,3 +469,3 @@ *

for (const [column, direction] of Object.entries(this.bulkOptions.order)) {
orderColumns.push(`${escapeIdentifier(column)} ${direction}`);
orderColumns.push(`${column} ${direction}`);
}

@@ -504,3 +490,3 @@

getBulkInsertSql() {
let sql = 'insert bulk ' + escapeIdentifier(this.table) + ' (';
let sql = 'insert bulk ' + this.table + '(';

@@ -514,3 +500,3 @@ for (let i = 0, len = this.columns.length; i < len; i++) {

sql += escapeIdentifier(c.name) + ' ' + c.type.declaration(c);
sql += '[' + c.name + '] ' + c.type.declaration(c);
}

@@ -536,3 +522,3 @@

getTableCreationSql() {
let sql = 'CREATE TABLE ' + escapeIdentifier(this.table) + ' (\n';
let sql = 'CREATE TABLE ' + this.table + '(\n';

@@ -546,3 +532,3 @@ for (let i = 0, len = this.columns.length; i < len; i++) {

sql += escapeIdentifier(c.name) + ' ' + c.type.declaration(c);
sql += '[' + c.name + '] ' + c.type.declaration(c);

@@ -549,0 +535,0 @@ if (c.nullable !== undefined) {

@@ -30,3 +30,3 @@ {

"license": "MIT",
"version": "11.3.0",
"version": "11.3.1",
"main": "./lib/tedious.js",

@@ -33,0 +33,0 @@ "repository": {

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