@malloydata/db-mysql 0.0.336 → 0.0.337

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.
Files changed (2) hide show
  1. package/dist/index.js +31 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -10,4 +10,35 @@ exports.MySQLExecutor = exports.MySQLConnection = void 0;
10
10
  var mysql_connection_1 = require("./mysql_connection");
11
11
  Object.defineProperty(exports, "MySQLConnection", { enumerable: true, get: function () { return mysql_connection_1.MySQLConnection; } });
12
12
  Object.defineProperty(exports, "MySQLExecutor", { enumerable: true, get: function () { return mysql_connection_1.MySQLExecutor; } });
13
+ const malloy_1 = require("@malloydata/malloy");
14
+ const mysql_connection_2 = require("./mysql_connection");
15
+ (0, malloy_1.registerConnectionType)('mysql', {
16
+ factory: (config) => {
17
+ return new mysql_connection_2.MySQLConnection(config.name, {
18
+ host: typeof config['host'] === 'string' ? config['host'] : undefined,
19
+ port: typeof config['port'] === 'number' ? config['port'] : undefined,
20
+ database: typeof config['database'] === 'string' ? config['database'] : undefined,
21
+ user: typeof config['user'] === 'string' ? config['user'] : undefined,
22
+ password: typeof config['password'] === 'string' ? config['password'] : undefined,
23
+ });
24
+ },
25
+ properties: [
26
+ { name: 'host', displayName: 'Host', type: 'string', optional: true },
27
+ {
28
+ name: 'port',
29
+ displayName: 'Port',
30
+ type: 'number',
31
+ optional: true,
32
+ default: '3306',
33
+ },
34
+ { name: 'database', displayName: 'Database', type: 'string', optional: true },
35
+ { name: 'user', displayName: 'User', type: 'string', optional: true },
36
+ {
37
+ name: 'password',
38
+ displayName: 'Password',
39
+ type: 'password',
40
+ optional: true,
41
+ },
42
+ ],
43
+ });
13
44
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/db-mysql",
3
- "version": "0.0.336",
3
+ "version": "0.0.337",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "prepublishOnly": "npm run build"
23
23
  },
24
24
  "dependencies": {
25
- "@malloydata/malloy": "0.0.336",
25
+ "@malloydata/malloy": "0.0.337",
26
26
  "@types/node": "^22.7.4",
27
27
  "fastestsmallesttextencoderdecoder": "^1.0.22",
28
28
  "luxon": "^3.5.0",