lava-oushudb-dt-sql-parser/test/parser/plsql/syntax.test.ts
Hayden 8f72a5af60
Fix/export abstract visitor (#237)
* fix: #236 export AbstractParseTreeVisitor

* build: set isolatedModules true

* feat: import parser about from filters
2023-12-19 19:22:27 +08:00

24 lines
647 B
TypeScript

import { PLSQL } from '../../filters';
describe('PLSQL Syntax Tests', () => {
const parser = new PLSQL();
test('Test simple select Statement', () => {
const sql = 'select id,name from user1;';
const result = parser.validate(sql);
expect(result.length).toBe(0);
});
test(`Test select, where, order by`, () => {
const sql = `
select eid, emp_last, mgr_id, reportlevel
from reports_to_101 r, auto a
where r.c1 = a.c2
order by reportlevel, eid
`;
const result = parser.validate(sql);
expect(result.length).toBe(0);
});
});