dbgate-plugin-mssql 5.2.7 → 5.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend.js +2 -219
- package/dist/backend.js.LICENSE.txt +65 -0
- package/dist/frontend.js +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
3
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
8
|
+
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
9
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
14
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* @copyright (c) 2016, Philipp Thürwächter, Pattrick Hüper
|
|
19
|
+
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
20
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/*! @azure/msal-common v14.10.0 2024-05-07 */
|
|
24
|
+
|
|
25
|
+
/*! @azure/msal-node v2.8.0 2024-05-07 */
|
|
26
|
+
|
|
27
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
31
|
+
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
32
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
|
|
37
|
+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @license
|
|
42
|
+
* Lodash <https://lodash.com/>
|
|
43
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
44
|
+
* Released under MIT license <https://lodash.com/license>
|
|
45
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
46
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* [js-md4]{@link https://github.com/emn178/js-md4}
|
|
51
|
+
*
|
|
52
|
+
* @namespace md4
|
|
53
|
+
* @version 0.3.2
|
|
54
|
+
* @author Yi-Cyuan Chen [emn178@gmail.com]
|
|
55
|
+
* @copyright Yi-Cyuan Chen 2015-2027
|
|
56
|
+
* @license MIT
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
|
|
60
|
+
|
|
61
|
+
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
|
|
62
|
+
|
|
63
|
+
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
|
|
64
|
+
|
|
65
|
+
//! @version @js-joda/core - 5.6.2
|
package/dist/frontend.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var plugin
|
|
1
|
+
var plugin;(()=>{var e={994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.redisSplitterOptions=t.noSplitSplitterOptions=t.mongoSplitterOptions=t.sqliteSplitterOptions=t.postgreSplitterOptions=t.mssqlSplitterOptions=t.mysqlSplitterOptions=t.defaultSplitterOptions=void 0,t.defaultSplitterOptions={stringsBegins:["'"],stringsEnds:{"'":"'"},stringEscapes:{"'":"'"},allowSemicolon:!0,allowCustomDelimiter:!1,allowGoDelimiter:!1,allowDollarDollarString:!1,noSplit:!1,doubleDashComments:!0,multilineComments:!0,javaScriptComments:!1,returnRichInfo:!1,splitByLines:!1,preventSingleLineSplit:!1,adaptiveGoSplit:!1,ignoreComments:!1},t.mysqlSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{allowCustomDelimiter:!0,stringsBegins:["'","`"],stringsEnds:{"'":"'","`":"`"},stringEscapes:{"'":"\\","`":"`"}}),t.mssqlSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{allowSemicolon:!1,allowGoDelimiter:!0,stringsBegins:["'","["],stringsEnds:{"'":"'","[":"]"},stringEscapes:{"'":"'"}}),t.postgreSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{allowDollarDollarString:!0,stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}}),t.sqliteSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"'",'"':'"'}}),t.mongoSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{stringsBegins:["'",'"'],stringsEnds:{"'":"'",'"':'"'},stringEscapes:{"'":"\\",'"':"\\"}}),t.noSplitSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{noSplit:!0}),t.redisSplitterOptions=Object.assign(Object.assign({},t.defaultSplitterOptions),{splitByLines:!0})},964:e=>{const{SqlDumper:t,testEqualColumns:a,arrayToHexString:r}=window.DBGATE_TOOLS;class n extends t{constructor(e,t){super(e),t&&t.useHardSeparator&&(this.useHardSeparator=!0)}endCommand(){this.useHardSeparator?this.putRaw("\nGO\n"):super.endCommand()}dropDatabase(e){this.putCmd("USE master;\n ALTER DATABASE %i SET SINGLE_USER WITH ROLLBACK IMMEDIATE;\n DROP DATABASE %i",e,e)}autoIncrement(){this.put(" ^identity")}putStringValue(e){/[^\u0000-\u00ff]/.test(e)&&this.putRaw("N"),super.putStringValue(e)}putByteArrayValue(e){super.putRaw("0x"+r(e))}allowIdentityInsert(e,t){this.putCmd("^set ^identity_insert %f %k",e,t?"on":"off")}transform(e,t){switch(e){case"GROUP:YEAR":case"YEAR":this.put("^datepart(^year, %c)",t);break;case"MONTH":this.put("^datepart(^month, %c)",t);break;case"DAY":this.put("^datepart(^day, %c)",t);break;case"GROUP:MONTH":this.put("^convert(^varchar(100), ^datepart(^year, %c)) + '-' + right('0' + ^convert(^varchar(100), ^datepart(^month, %c)), 2)",t,t);break;case"GROUP:DAY":this.put("^^convert(^varchar(100), ^datepart(^year, %c)) + '-' + ^right('0' + ^convert(^varchar(100), ^datepart(^month, %c)), 2)+'-' + ^right('0' + ^convert(^varchar(100), ^datepart(^day, %c)), 2)",t,t,t);break;default:t()}}renameObject(e,t){this.putCmd("^execute sp_rename '%f', '%s', 'OBJECT'",e,t)}changeObjectSchema(e,t){this.putCmd("^execute sp_changeobjectowner '%f', '%s'",e,t)}dropTable(e,t={}){t.testIfExists&&this.put("IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'%f') AND type in (N'U'))&n",e),super.dropTable(e,t)}dropColumn(e){e.defaultConstraint&&this.putCmd("^alter ^table %f ^drop ^constraint %i",e,e.defaultConstraint),super.dropColumn(e)}dropDefault(e){e.defaultConstraint&&this.putCmd("^alter ^table %f ^drop ^constraint %i",e,e.defaultConstraint)}guessDefaultName(e){return e.defaultConstraint||`DF${e.schemaName||"dbo"}_${e.pureName}_col.columnName`}createDefault(e){if(!e.defaultValue)return;const t=e.defaultValue;if(!t){const a=this.guessDefaultName(e);this.putCmd("^alter ^table %f ^add ^constraint %i ^default %s for %i",e,a,t,e.columnName)}}renameColumn(e,t){this.putCmd("^execute sp_rename '%f.%i', '%s', 'COLUMN'",e,e.columnName,t)}changeColumn(e,t,r){a(e,t,!1,!1)?(this.dropDefault(e),e.columnName!=t.columnName&&this.renameColumn(e,t.columnName),this.createDefault(e)):(this.dropDefault(e),e.columnName!=t.columnName&&this.renameColumn(e,t.columnName),this.put("^alter ^table %f ^alter ^column %i ",e,e.columnName,t.columnName),this.columnDefinition(t,{includeDefault:!1}),this.endCommand(),this.createDefault(e))}specialColumnOptions(e){e.isSparse&&this.put("^sparse ")}renameConstraint(e,t){"index"==e.constraintType?this.putCmd("^execute sp_rename '%f.%i', '%s', 'INDEX'",e,e.constraintName,t):this.putCmd("^execute sp_rename '%f', '%s', 'OBJECT'",{schemaName:e.schemaName,pureName:e.constraintName},t)}selectScopeIdentity(){this.put("^select ^scope_identity()")}}n.prototype.renameView=n.prototype.renameObject,n.prototype.changeViewSchema=n.prototype.changeObjectSchema,n.prototype.renameProcedure=n.prototype.renameObject,n.prototype.changeProcedureSchema=n.prototype.changeObjectSchema,n.prototype.renameFunction=n.prototype.renameObject,n.prototype.changeFunctionSchema=n.prototype.changeObjectSchema,n.prototype.renameTrigger=n.prototype.renameObject,n.prototype.changeTriggerSchema=n.prototype.changeObjectSchema,n.prototype.renameTable=n.prototype.renameObject,n.prototype.changeTableSchema=n.prototype.changeObjectSchema,e.exports=n},831:(e,t,a)=>{const{driverBase:r}=window.DBGATE_TOOLS,n=a(964),{mssqlSplitterOptions:s}=a(994),i=["GEOGRAPHY"],o={limitSelect:!0,rangeSelect:!0,offsetFetchRangeSyntax:!0,rowNumberOverPaging:!0,defaultSchemaName:"dbo",stringEscapeChar:"'",fallbackDataType:"nvarchar(max)",explicitDropConstraint:!1,enableConstraintsPerTable:!0,dropColumnDependencies:["default","dependencies","indexes","primaryKey","foreignKeys","uniques"],changeColumnDependencies:["indexes","dependencies","uniques"],anonymousPrimaryKey:!1,dropIndexContainsTableSpec:!0,quoteIdentifier:e=>`[${e}]`,createColumn:!0,dropColumn:!0,changeColumn:!0,createIndex:!0,dropIndex:!0,createForeignKey:!0,dropForeignKey:!0,createPrimaryKey:!0,dropPrimaryKey:!0,createUnique:!0,dropUnique:!0,createCheck:!0,dropCheck:!0,dropReferencesWhenDropTable:!0,columnProperties:{isSparse:!0,isPersisted:!0},predefinedDataTypes:["bigint","bit","decimal(10,2)","int","money","numeric","smallint","smallmoney","tinyint","float","real","date","datetime2","datetime","datetimeoffset","smalldatetime","time","char(20)","varchar(250)","text","nchar(20)","nvarchar(250)","ntext","binary(100)","varbinary(100)","image","xml"],createColumnViewExpression:(e,t,a,r)=>t&&i.includes(t.toUpperCase())?{exprType:"methodCall",method:"STAsText",alias:r||e,thisObject:{exprType:"column",columnName:e,source:a}}:t&&"XML"==t.toUpperCase()?{exprType:"call",func:"CONVERT",alias:r||e,args:[{exprType:"raw",sql:"NVARCHAR(MAX)"},{exprType:"column",columnName:e,source:a}]}:void 0},p={...r,dumperClass:n,dialect:o,readOnlySessions:!1,requiresDefaultSortCriteria:!0,dialectByVersion:e=>e&&e.productVersionNumber<11?{...o,rangeSelect:!1,offsetFetchRangeSyntax:!1}:o,showConnectionField:(e,t)=>["authType","server","port","user","password","defaultDatabase","singleDatabase","isReadOnly"].includes(e)||"trustServerCertificate"==e&&"sql"!=t.authType&&"sspi"!=t.authType||"windowsDomain"==e&&"sql"!=t.authType&&"sspi"!=t.authType,getQuerySplitterOptions:e=>"editor"==e?{...s,adaptiveGoSplit:!0,ignoreComments:!0,preventSingleLineSplit:!0}:s,engine:"mssql@dbgate-plugin-mssql",title:"Microsoft SQL Server",defaultPort:1433,defaultAuthTypeName:"tedious",getNewObjectTemplates:()=>[{label:"New view",sql:"CREATE VIEW myview\nAS\nSELECT * FROM table1"},{label:"New procedure",sql:"CREATE PROCEDURE myproc (@arg1 INT)\nAS\nBEGIN\n SELECT * FROM table1\nEND"},{label:"New function",sql:"CREATE FUNCTION myfunc (@arg1 INT) RETURNS INT\nAS\nBEGIN\n RETURN 1;\nEND"},{label:"New table valued function",sql:"CREATE FUNCTION myfunc (@arg1 INT) RETURNS TABLE \nAS\nRETURN SELECT * FROM table1"}]};e.exports=p}},t={};function a(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";a.r(r),a.d(r,{default:()=>t});var e=a(831);const t={drivers:[a.n(e)()]}})(),plugin=r})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbgate-plugin-mssql",
|
|
3
3
|
"main": "dist/backend.js",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.9",
|
|
5
5
|
"homepage": "https://dbgate.org",
|
|
6
6
|
"description": "MS SQL connect plugin for DbGate",
|
|
7
7
|
"repository": {
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"dbgate-plugin-tools": "^1.0.7",
|
|
35
35
|
"dbgate-query-splitter": "^4.9.3",
|
|
36
|
-
"webpack": "^
|
|
37
|
-
"webpack-cli": "^
|
|
38
|
-
"dbgate-tools": "^5.2.
|
|
39
|
-
"tedious": "^
|
|
36
|
+
"webpack": "^5.91.0",
|
|
37
|
+
"webpack-cli": "^5.1.4",
|
|
38
|
+
"dbgate-tools": "^5.2.9",
|
|
39
|
+
"tedious": "^18.2.0",
|
|
40
40
|
"async-lock": "^1.2.6"
|
|
41
41
|
}
|
|
42
42
|
}
|