@malloydata/db-mysql 0.0.326 → 0.0.328
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/mysql_connection.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/db-mysql",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.328",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"lint-fix": "eslint '**/*.ts{,x}' --fix",
|
|
18
18
|
"test": "jest --config=../../jest.config.js",
|
|
19
19
|
"build": "tsc --build",
|
|
20
|
-
"clean": "tsc --build --clean",
|
|
20
|
+
"clean": "tsc --build --clean && rm -f tsconfig.tsbuildinfo",
|
|
21
21
|
"malloyc": "ts-node ../../scripts/malloy-to-json",
|
|
22
22
|
"prepublishOnly": "npm run build"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@malloydata/malloy": "0.0.
|
|
25
|
+
"@malloydata/malloy": "0.0.328",
|
|
26
26
|
"@types/node": "^22.7.4",
|
|
27
27
|
"fastestsmallesttextencoderdecoder": "^1.0.22",
|
|
28
28
|
"luxon": "^3.5.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const _1 = require(".");
|
|
10
|
-
describe('MySQL Connection', () => {
|
|
11
|
-
let connection;
|
|
12
|
-
it('is true', async () => {
|
|
13
|
-
expect(1).toBe(1);
|
|
14
|
-
});
|
|
15
|
-
beforeAll(() => {
|
|
16
|
-
const config = _1.MySQLExecutor.getConnectionOptionsFromEnv();
|
|
17
|
-
connection = new _1.MySQLConnection('mysql', config, {});
|
|
18
|
-
});
|
|
19
|
-
afterAll(() => {
|
|
20
|
-
connection.close();
|
|
21
|
-
});
|
|
22
|
-
it('runs a SQL query', async () => {
|
|
23
|
-
const res = await connection.runSQL('SELECT 1 as t');
|
|
24
|
-
expect(res.rows[0]['t']).toBe(1);
|
|
25
|
-
});
|
|
26
|
-
it('fetches schema', async () => {
|
|
27
|
-
const res = await connection.fetchSchemaForTables({
|
|
28
|
-
'malloytest.airports': 'malloytest.airports',
|
|
29
|
-
}, {});
|
|
30
|
-
expect(res.schemas['malloytest.airports'].dialect).toBe('mysql');
|
|
31
|
-
});
|
|
32
|
-
it('fetches schema for SQL block', async () => {
|
|
33
|
-
var _a;
|
|
34
|
-
const res = await connection.fetchSchemaForSQLStruct({
|
|
35
|
-
selectStr: 'SELECT 1 as one',
|
|
36
|
-
connection: 'mysql',
|
|
37
|
-
}, {});
|
|
38
|
-
expect((_a = res.structDef) === null || _a === void 0 ? void 0 : _a.fields[0].name).toBe('one');
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=mysql.s_p_e_c_dont_run.js.map
|