@malloydata/db-mysql 0.0.393 → 0.0.395

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.
@@ -44,13 +44,6 @@ const malloy_1 = require("@malloydata/malloy");
44
44
  const connection_1 = require("@malloydata/malloy/connection");
45
45
  const crypto_1 = require("crypto");
46
46
  const MYSQL = __importStar(require("mysql2/promise"));
47
- /**
48
- * A bare or schema-qualified SQL identifier — `name` or `db.name`. Anything
49
- * else (dashes, dots-as-extensions, slashes, special characters) needs to be
50
- * wrapped in backticks for `DESCRIBE` to parse it as one identifier rather
51
- * than e.g. parsing `my-table` as subtraction.
52
- */
53
- const SQL_IDENTIFIER_CHAIN = /^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$/;
54
47
  class MySQLExecutor {
55
48
  static getConnectionOptionsFromEnv() {
56
49
  const user = process.env['MYSQL_USER'];
@@ -167,10 +160,7 @@ class MySQLConnection extends connection_1.BaseConnection {
167
160
  connection: this.name,
168
161
  fields: [],
169
162
  };
170
- const quotedTablePath = SQL_IDENTIFIER_CHAIN.test(tablePath)
171
- ? tablePath
172
- : `\`${tablePath}\``;
173
- const infoQuery = `DESCRIBE ${quotedTablePath}`;
163
+ const infoQuery = `DESCRIBE ${tablePath}`;
174
164
  const result = await this.runRawSQL(infoQuery);
175
165
  await this.schemaFromResult(result, structDef);
176
166
  return structDef;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/db-mysql",
3
- "version": "0.0.393",
3
+ "version": "0.0.395",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "prepublishOnly": "npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "@malloydata/malloy": "0.0.393",
26
+ "@malloydata/malloy": "0.0.395",
27
27
  "@types/node": "^22.7.4",
28
28
  "fastestsmallesttextencoderdecoder": "^1.0.22",
29
29
  "luxon": "^3.5.0",