@appland/scanner 1.81.1 → 1.82.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.
- package/CHANGELOG.md +12 -0
- package/built/appMapIndex.js +12 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [@appland/scanner-v1.82.0](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.81.1...@appland/scanner-v1.82.0) (2023-08-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fix caching of unparseable SQL ([e81db08](https://github.com/getappmap/appmap-js/commit/e81db08d6f6a7b661f77aa3aead5e800e15a7358))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Analyze in worker threads ([612da06](https://github.com/getappmap/appmap-js/commit/612da06532e765469094aaeaaf614a52e75e46d2))
|
|
12
|
+
|
|
1
13
|
# [@appland/scanner-v1.81.1](https://github.com/getappmap/appmap-js/compare/@appland/scanner-v1.81.0...@appland/scanner-v1.81.1) (2023-08-11)
|
|
2
14
|
|
|
3
15
|
|
package/built/appMapIndex.js
CHANGED
|
@@ -15,12 +15,19 @@ class AppMapIndex {
|
|
|
15
15
|
if (!event.sql)
|
|
16
16
|
throw new Error(`${event.fqid} is not a SQL query`);
|
|
17
17
|
const sql = this.sqlNormalized(event);
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
let result;
|
|
19
|
+
const cachedAST = ASTBySQLString.get(sql);
|
|
20
|
+
if (cachedAST === 'parse-error') {
|
|
21
|
+
result = undefined;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
else if (cachedAST) {
|
|
24
|
+
result = cachedAST;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
result = (0, models_1.parseSQL)(sql);
|
|
28
|
+
ASTBySQLString.set(sql, result ? result : 'parse-error');
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
24
31
|
}
|
|
25
32
|
sqlNormalized(event) {
|
|
26
33
|
if (!event.sql)
|