@fluidware-it/mysql2-client 0.2.5 → 0.3.0

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.
@@ -1,4 +1,5 @@
1
1
  export * from './config';
2
2
  export * from './dbClient';
3
3
  export * from './upgradeManager';
4
+ export * from './utils';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -16,4 +16,5 @@
16
16
  export * from './config';
17
17
  export * from './dbClient';
18
18
  export * from './upgradeManager';
19
+ export * from './utils';
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './config';\nexport * from './dbClient';\nexport * from './upgradeManager';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './config';\nexport * from './dbClient';\nexport * from './upgradeManager';\nexport * from './utils';\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function getDateAsUTCMysqlString(date: Date, mills?: boolean): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright Fluidware srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export function getDateAsUTCMysqlString(date, mills) {
17
+ if (mills === void 0) { mills = false; }
18
+ var year = date.getUTCFullYear();
19
+ var month = "".concat(date.getUTCMonth() + 1).padStart(2, '0');
20
+ var day = "".concat(date.getUTCDate()).padStart(2, '0');
21
+ var hours = "".concat(date.getUTCHours()).padStart(2, '0');
22
+ var minutes = "".concat(date.getUTCMinutes()).padStart(2, '0');
23
+ var seconds = "".concat(date.getUTCSeconds()).padStart(2, '0');
24
+ var millisecond = mills ? '.' + "".concat(date.getUTCMilliseconds()).padStart(3, '0') : '';
25
+ return "".concat(year, "-").concat(month, "-").concat(day, " ").concat(hours, ":").concat(minutes, ":").concat(seconds).concat(millisecond);
26
+ }
27
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,UAAU,uBAAuB,CAAC,IAAU,EAAE,KAAa;IAAb,sBAAA,EAAA,aAAa;IAC/D,IAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACnC,IAAM,KAAK,GAAG,UAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,IAAM,GAAG,GAAG,UAAG,IAAI,CAAC,UAAU,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACpD,IAAM,KAAK,GAAG,UAAG,IAAI,CAAC,WAAW,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvD,IAAM,OAAO,GAAG,UAAG,IAAI,CAAC,aAAa,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,IAAM,OAAO,GAAG,UAAG,IAAI,CAAC,aAAa,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,IAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,UAAG,IAAI,CAAC,kBAAkB,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvF,OAAO,UAAG,IAAI,cAAI,KAAK,cAAI,GAAG,cAAI,KAAK,cAAI,OAAO,cAAI,OAAO,SAAG,WAAW,CAAE,CAAC;AAChF,CAAC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getDateAsUTCMysqlString(date: Date, mills = false) {\n const year = date.getUTCFullYear();\n const month = `${date.getUTCMonth() + 1}`.padStart(2, '0');\n const day = `${date.getUTCDate()}`.padStart(2, '0');\n const hours = `${date.getUTCHours()}`.padStart(2, '0');\n const minutes = `${date.getUTCMinutes()}`.padStart(2, '0');\n const seconds = `${date.getUTCSeconds()}`.padStart(2, '0');\n const millisecond = mills ? '.' + `${date.getUTCMilliseconds()}`.padStart(3, '0') : '';\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}${millisecond}`;\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  export * from './config';
2
2
  export * from './dbClient';
3
3
  export * from './upgradeManager';
4
+ export * from './utils';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -16,4 +16,5 @@
16
16
  export * from './config';
17
17
  export * from './dbClient';
18
18
  export * from './upgradeManager';
19
+ export * from './utils';
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './config';\nexport * from './dbClient';\nexport * from './upgradeManager';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './config';\nexport * from './dbClient';\nexport * from './upgradeManager';\nexport * from './utils';\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function getDateAsUTCMysqlString(date: Date, mills?: boolean): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright Fluidware srl
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export function getDateAsUTCMysqlString(date, mills = false) {
17
+ const year = date.getUTCFullYear();
18
+ const month = `${date.getUTCMonth() + 1}`.padStart(2, '0');
19
+ const day = `${date.getUTCDate()}`.padStart(2, '0');
20
+ const hours = `${date.getUTCHours()}`.padStart(2, '0');
21
+ const minutes = `${date.getUTCMinutes()}`.padStart(2, '0');
22
+ const seconds = `${date.getUTCSeconds()}`.padStart(2, '0');
23
+ const millisecond = mills ? '.' + `${date.getUTCMilliseconds()}`.padStart(3, '0') : '';
24
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}${millisecond}`;
25
+ }
26
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,UAAU,uBAAuB,CAAC,IAAU,EAAE,KAAK,GAAG,KAAK;IAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvF,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,OAAO,IAAI,OAAO,GAAG,WAAW,EAAE,CAAC;AAChF,CAAC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getDateAsUTCMysqlString(date: Date, mills = false) {\n const year = date.getUTCFullYear();\n const month = `${date.getUTCMonth() + 1}`.padStart(2, '0');\n const day = `${date.getUTCDate()}`.padStart(2, '0');\n const hours = `${date.getUTCHours()}`.padStart(2, '0');\n const minutes = `${date.getUTCMinutes()}`.padStart(2, '0');\n const seconds = `${date.getUTCSeconds()}`.padStart(2, '0');\n const millisecond = mills ? '.' + `${date.getUTCMilliseconds()}`.padStart(3, '0') : '';\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}${millisecond}`;\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  export * from './config';
2
2
  export * from './dbClient';
3
3
  export * from './upgradeManager';
4
+ export * from './utils';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -32,4 +32,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
32
32
  __exportStar(require("./config"), exports);
33
33
  __exportStar(require("./dbClient"), exports);
34
34
  __exportStar(require("./upgradeManager"), exports);
35
+ __exportStar(require("./utils"), exports);
35
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,6CAA2B;AAC3B,mDAAiC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './config';\nexport * from './dbClient';\nexport * from './upgradeManager';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,6CAA2B;AAC3B,mDAAiC;AACjC,0CAAwB","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './config';\nexport * from './dbClient';\nexport * from './upgradeManager';\nexport * from './utils';\n"]}
@@ -0,0 +1,2 @@
1
+ export declare function getDateAsUTCMysqlString(date: Date, mills?: boolean): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright Fluidware srl
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.getDateAsUTCMysqlString = void 0;
19
+ function getDateAsUTCMysqlString(date, mills = false) {
20
+ const year = date.getUTCFullYear();
21
+ const month = `${date.getUTCMonth() + 1}`.padStart(2, '0');
22
+ const day = `${date.getUTCDate()}`.padStart(2, '0');
23
+ const hours = `${date.getUTCHours()}`.padStart(2, '0');
24
+ const minutes = `${date.getUTCMinutes()}`.padStart(2, '0');
25
+ const seconds = `${date.getUTCSeconds()}`.padStart(2, '0');
26
+ const millisecond = mills ? '.' + `${date.getUTCMilliseconds()}`.padStart(3, '0') : '';
27
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}${millisecond}`;
28
+ }
29
+ exports.getDateAsUTCMysqlString = getDateAsUTCMysqlString;
30
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,SAAgB,uBAAuB,CAAC,IAAU,EAAE,KAAK,GAAG,KAAK;IAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvF,OAAO,GAAG,IAAI,IAAI,KAAK,IAAI,GAAG,IAAI,KAAK,IAAI,OAAO,IAAI,OAAO,GAAG,WAAW,EAAE,CAAC;AAChF,CAAC;AATD,0DASC","sourcesContent":["/*\n * Copyright Fluidware srl\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function getDateAsUTCMysqlString(date: Date, mills = false) {\n const year = date.getUTCFullYear();\n const month = `${date.getUTCMonth() + 1}`.padStart(2, '0');\n const day = `${date.getUTCDate()}`.padStart(2, '0');\n const hours = `${date.getUTCHours()}`.padStart(2, '0');\n const minutes = `${date.getUTCMinutes()}`.padStart(2, '0');\n const seconds = `${date.getUTCSeconds()}`.padStart(2, '0');\n const millisecond = mills ? '.' + `${date.getUTCMilliseconds()}`.padStart(3, '0') : '';\n return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}${millisecond}`;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidware-it/mysql2-client",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "main": "build/src/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "esnext": "build/esnext/index.js",