dc417e1381
* feat: feat: improve flinksql insertStatement * feat: complete insertFromSelectQueries syntax unit tests * feat: complete insertValuesIntoTable syntax unit tests * feat: improve insertValuesIntoTable sql case data * feat: complete insertMultipeTables unit cases * feat: depracate insertMulStatement grammar for 1.1.4 * fix: depracate unless files * test: recover jest.config info * feat: improve insertMultipleTable.sql test case * feat: build new flinksql parser and lexer * feat: generator new flink parser and lexer file * test: improve readSQL logic * test: fix insertMultipleTable sql error * test: recover jest.config.js info
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import FlinkSQL from '../../../../src/parser/flinksql';
|
|
import { readSQL } from '../../../helper';
|
|
|
|
|
|
const parser = new FlinkSQL();
|
|
|
|
const features = {
|
|
InsertFromSelectQueries: readSQL(__dirname, 'insertFromSelectQueries.sql'),
|
|
InsertValuesIntoTable: readSQL(__dirname, 'insertValuesIntoTable.sql'),
|
|
InsertMultipleTable: readSQL(__dirname, 'insertMultipleTable.sql')
|
|
};
|
|
|
|
describe('FlinkSQL Insert Syntax Tests', () => {
|
|
features.InsertFromSelectQueries.forEach((insertFromSelectQueries) => {
|
|
it(insertFromSelectQueries, () => {
|
|
expect(parser.validate(insertFromSelectQueries).length).toBe(0);
|
|
});
|
|
});
|
|
features.InsertValuesIntoTable.forEach((insertValuesIntoTable) => {
|
|
it(insertValuesIntoTable, () => {
|
|
expect(parser.validate(insertValuesIntoTable).length).toBe(0);
|
|
});
|
|
});
|
|
features.InsertMultipleTable.forEach((insertMultipleTable) => {
|
|
it(insertMultipleTable, () => {
|
|
expect(parser.validate(insertMultipleTable).length).toBe(0);
|
|
});
|
|
});
|
|
});
|