bb0fad1dbe
* refactor: rename flinksql to flink * refactor: rename pgsql to postgresql * refactor: rename trinosql to trino * refactor: replace all default exports with named export * refactor: rename basicParser to basicSQL * refactor: rename basic-parser-types to types * refactor: replace arrow func with plain func
24 lines
647 B
TypeScript
24 lines
647 B
TypeScript
import { PLSQL } from 'src/parser/plsql';
|
|
|
|
describe('PLSQL Syntax Tests', () => {
|
|
const plsql = new PLSQL();
|
|
|
|
test('Test simple select Statement', () => {
|
|
const sql = 'select id,name from user1;';
|
|
const result = plsql.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 = plsql.validate(sql);
|
|
expect(result.length).toBe(0);
|
|
});
|
|
});
|