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

dbgate-query-splitter

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbgate-query-splitter - npm Package Compare versions

Comparing version 4.9.2 to 4.9.3

2

lib/splitQuery.js

@@ -157,3 +157,3 @@ "use strict";

if (context.options.adaptiveGoSplit) {
const m = s.slice(pos).match(/^CREATE\s*(PROCEDURE|FUNCTION|TRIGGER)/i);
const m = s.slice(pos).match(/^(CREATE|ALTER)\s*(PROCEDURE|FUNCTION|TRIGGER)/i);
if (m) {

@@ -160,0 +160,0 @@ return {

@@ -49,4 +49,10 @@ "use strict";

test('adaptive go split -mssql', () => {
const output = (0, splitQuery_1.splitQuery)('SELECT 1;CREATE PROCEDURE p1 AS BEGIN SELECT 2;SELECT 3;END\nGO\nSELECT 4;SELECT 5', Object.assign(Object.assign({}, options_1.mssqlSplitterOptions), { adaptiveGoSplit: true }));
expect(output).toEqual(['SELECT 1', 'CREATE PROCEDURE p1 AS BEGIN SELECT 2;SELECT 3;END', 'SELECT 4', 'SELECT 5']);
const output = (0, splitQuery_1.splitQuery)('SELECT 1;CREATE PROCEDURE p1 AS BEGIN SELECT 2;SELECT 3;END\nGO\nSELECT 4;SELECT 5;ALTER PROCEDURE p1 AS BEGIN SELECT 2;SELECT 3;END', Object.assign(Object.assign({}, options_1.mssqlSplitterOptions), { adaptiveGoSplit: true }));
expect(output).toEqual([
'SELECT 1',
'CREATE PROCEDURE p1 AS BEGIN SELECT 2;SELECT 3;END',
'SELECT 4',
'SELECT 5',
'ALTER PROCEDURE p1 AS BEGIN SELECT 2;SELECT 3;END',
]);
});

@@ -53,0 +59,0 @@ test('delimiter test', () => {

{
"version": "4.9.2",
"version": "4.9.3",
"name": "dbgate-query-splitter",

@@ -4,0 +4,0 @@ "main": "lib/index.js",

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