2023-05-04 10:13:05 +08:00
|
|
|
import PostgresSQL from '../../../src/parser/pgsql';
|
2022-12-16 03:26:34 +08:00
|
|
|
|
|
|
|
describe('PostgresSQL Lexer tests', () => {
|
|
|
|
const mysqlParser = new PostgresSQL();
|
|
|
|
|
|
|
|
const sql = 'select id,name,sex from user1;';
|
|
|
|
const tokens = mysqlParser.getAllTokens(sql);
|
|
|
|
|
|
|
|
test('token counts', () => {
|
2023-05-30 14:44:03 +08:00
|
|
|
expect(tokens.length).toBe(12);
|
2022-12-16 03:26:34 +08:00
|
|
|
});
|
|
|
|
});
|