Skip to content

Commit ba5d30d

Browse files
Cythia828zhaoge
authored and
zhaoge
committed
feat(flinksql): collect comment, type attribute for entity (DTStack#319)
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(DTStack#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
1 parent 46da6ec commit ba5d30d

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

test/parser/mysql/contextCollect/entityCollector.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ import fs from 'fs';
33
import path from 'path';
44
import { MySqlParserListener } from 'src/lib/mysql/MySqlParserListener';
55
import {
6-
isCommonEntityContext,
7-
isFuncEntityContext,
8-
StmtContextType,
6+
isCommonEntityContext,
7+
isFuncEntityContext,
8+
StmtContextType,
99
} from 'src/parser/common/entityCollector';
1010
import { EntityContextType } from 'src/parser/common/types';
11-
import { MySQL, MySqlEntityCollector, MysqlSplitListener } from 'src/parser/mysql';
11+
import {
12+
MySQL,
13+
MySqlEntityCollector,
14+
MysqlSplitListener,
15+
} from 'src/parser/mysql';
1216

1317
const commonSql = fs.readFileSync(path.join(__dirname, 'fixtures', 'common.sql'), 'utf-8');
1418

test/parser/postgresql/contextCollect/entityCollector.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import { ParseTreeListener } from 'antlr4ng';
22
import fs from 'fs';
33
import path from 'path';
4-
import { PostgreSqlParserListener } from 'src/lib/postgresql/PostgreSqlParserListener';
54
import {
6-
isCommonEntityContext,
7-
isFuncEntityContext,
8-
StmtContextType,
5+
PostgreSqlParserListener,
6+
} from 'src/lib/postgresql/PostgreSqlParserListener';
7+
import {
8+
isCommonEntityContext,
9+
isFuncEntityContext,
10+
StmtContextType,
911
} from 'src/parser/common/entityCollector';
1012
import { EntityContextType } from 'src/parser/common/types';
1113
import {
12-
PostgreSQL,
13-
PostgreSqlEntityCollector,
14-
PostgreSqlSplitListener,
14+
PostgreSQL,
15+
PostgreSqlEntityCollector,
16+
PostgreSqlSplitListener,
1517
} from 'src/parser/postgresql';
1618

1719
const commonSql = fs.readFileSync(path.join(__dirname, 'fixtures', 'common.sql'), 'utf-8');

0 commit comments

Comments
 (0)