dbgate-plugin-mysql 5.2.7-alpha.1 → 5.2.8
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 -289
- package/dist/backend.js.LICENSE.txt +32 -0
- package/dist/frontend.js +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2009 The Closure Library Authors
|
|
4
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Lodash <https://lodash.com/>
|
|
24
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
25
|
+
* Released under MIT license <https://lodash.com/license>
|
|
26
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
27
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
//! moment.js
|
|
31
|
+
|
|
32
|
+
//! moment.js locale configuration
|
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})},464:e=>{var t=Array.isArray;e.exports=t},56:(e,t,n)=>{const{SqlDumper:s,arrayToHexString:i}=window.DBGATE_TOOLS;n(464),e.exports=class extends s{transform(e,t){switch(e){case"GROUP:YEAR":case"YEAR":this.put("^year(%c)",t);break;case"MONTH":this.put("^month(%c)",t);break;case"DAY":this.put("^day(%c)",t);break;case"GROUP:MONTH":this.put("^date_format(%c, '%s')",t,"%Y-%m");break;case"GROUP:DAY":this.put("^date_format(%c, '%s')",t,"%Y-%m-%d");break;default:t()}}renameTable(e,t){this.putCmd("^rename ^table %f ^to %i",e,t)}changeColumn(e,t,n){this.put("^alter ^table %f ^change ^column %i %i ",e,e.columnName,t.columnName),this.columnDefinition(t),this.inlineConstraints(n),this.endCommand()}autoIncrement(){}specialColumnOptions(e){e.isUnsigned&&this.put("^unsigned "),e.isZerofill&&this.put("^zerofill "),e.autoIncrement&&this.put("^auto_increment ")}columnDefinition(e,t){super.columnDefinition(e,t),e.columnComment&&this.put(" ^comment %v ",e.columnComment)}renameColumn(e,t){this.changeColumn(e,{...e,columnName:t},[])}enableConstraints(e,t){this.putCmd("^set FOREIGN_KEY_CHECKS = %s",t?"1":"0")}comment(e){this.put("/* %s */",e)}beginTransaction(){this.putCmd("^start ^transaction")}selectTableIntoNewTable(e,t){this.putCmd("^create ^table %f (^select * ^from %f)",t,e)}putByteArrayValue(e){this.putRaw(`unhex('${i(e)}')`)}selectScopeIdentity(){this.put("^select ^last_insert_id()")}}},378:(e,t,n)=>{const{driverBase:s}=window.DBGATE_TOOLS,{mysqlSplitterOptions:i}=n(994),a=n(56),r=["POINT","LINESTRING","POLYGON","GEOMETRY","MULTIPOINT","MULTILINESTRING","MULTIPOLYGON","GEOMCOLLECTION","GEOMETRYCOLLECTION"],l={...s,showConnectionField:(e,t)=>["authType","user","password","defaultDatabase","singleDatabase","isReadOnly"].includes(e)||"socket"==t.authType&&["socketPath"].includes(e)||"socket"!=t.authType&&["server","port"].includes(e),dumperClass:a,dialect:{rangeSelect:!0,stringEscapeChar:"\\",fallbackDataType:"longtext",enableConstraintsPerTable:!1,anonymousPrimaryKey:!0,explicitDropConstraint:!0,quoteIdentifier:e=>"`"+e+"`",createColumn:!0,dropColumn:!0,changeColumn:!0,createIndex:!0,dropIndex:!0,createForeignKey:!0,dropForeignKey:!0,createPrimaryKey:!0,dropPrimaryKey:!0,dropIndexContainsTableSpec:!0,createUnique:!0,dropUnique:!0,createCheck:!0,dropCheck:!0,dropReferencesWhenDropTable:!1,requireStandaloneSelectForScopeIdentity:!0,columnProperties:{columnComment:!0,isUnsigned:!0,isZerofill:!0},predefinedDataTypes:["char(20)","varchar(250)","binary(250)","varbinary(250)","tinyblob","tinytext","text(1000)","blob(1000)","mediumtext","mediumblob","longtext","longblob","enum('val1','val2','val3')","set('val1','val2','val3')","bit(32)","tinyint","bool","smallint","mediumint","int","bigint","float","double","decimal","date","datetime","timestamp","time","year"],createColumnViewExpression(e,t,n,s){if(t&&r.includes(t.toUpperCase()))return{exprType:"call",func:"ST_AsText",alias:s||e,args:[{exprType:"column",columnName:e,source:n}]}}},defaultPort:3306,getQuerySplitterOptions:e=>"editor"==e?{...i,ignoreComments:!0,preventSingleLineSplit:!0}:i,readOnlySessions:!0,supportsDatabaseDump:!0,authTypeLabel:"Connection mode",defaultAuthTypeName:"hostPort",defaultSocketPath:"/var/run/mysqld/mysqld.sock",getNewObjectTemplates:()=>[{label:"New view",sql:"CREATE VIEW myview\nAS\nSELECT * FROM table1"},{label:"New procedure",sql:"DELIMITER //\n\nCREATE PROCEDURE myproc (IN arg1 INT)\nBEGIN\n SELECT * FROM table1;\nEND\n\nDELIMITER ;"},{label:"New function",sql:"CREATE FUNCTION myfunc (arg1 INT)\nRETURNS INT DETERMINISTIC\nRETURN 1"}]},o={...l,engine:"mysql@dbgate-plugin-mysql",title:"MySQL",__analyserInternals:{quoteDefaultValues:!0}},p={...l,engine:"mariadb@dbgate-plugin-mysql",title:"MariaDB",__analyserInternals:{quoteDefaultValues:!1}};e.exports=[o,p]}},t={};function n(s){var i=t[s];if(void 0!==i)return i.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{default:()=>t});var e=n(378);const t={packageName:"dbgate-plugin-mysql",drivers:n.n(e)()}})(),plugin=s})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbgate-plugin-mysql",
|
|
3
3
|
"main": "dist/backend.js",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.8",
|
|
5
5
|
"homepage": "https://dbgate.org",
|
|
6
6
|
"description": "MySQL connect plugin for DbGate",
|
|
7
7
|
"repository": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"antares-mysql-dumper": "^0.0.1",
|
|
35
35
|
"dbgate-plugin-tools": "^1.0.7",
|
|
36
36
|
"dbgate-query-splitter": "^4.9.3",
|
|
37
|
-
"dbgate-tools": "^5.2.
|
|
38
|
-
"mysql2": "^
|
|
39
|
-
"webpack": "^
|
|
40
|
-
"webpack-cli": "^
|
|
37
|
+
"dbgate-tools": "^5.2.8",
|
|
38
|
+
"mysql2": "^3.9.7",
|
|
39
|
+
"webpack": "^5.91.0",
|
|
40
|
+
"webpack-cli": "^5.1.4"
|
|
41
41
|
}
|
|
42
42
|
}
|