refactor: standard naming (#278)
* 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
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
tables: readSQL(__dirname, 'alter_table.sql'),
|
||||
@ -13,21 +13,21 @@ describe('ImpalaSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER TABLE', () => {
|
||||
features.tables.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('ALTER DATABASE', () => {
|
||||
features.dbs.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('ALTER VIEW', () => {
|
||||
features.views.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
dbs: readSQL(__dirname, 'create_db.sql'),
|
||||
@ -15,35 +15,35 @@ describe('ImpalaSQL Create Syntax Tests', () => {
|
||||
describe('CREATE DB', () => {
|
||||
features.dbs.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('CREATE FUNCTION', () => {
|
||||
features.functions.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('CREATE ROLE', () => {
|
||||
features.roles.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('CREATE TABLE', () => {
|
||||
features.tables.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('CREATE VIEW', () => {
|
||||
features.views.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
deletes: readSQL(__dirname, 'delete.sql'),
|
||||
@ -11,7 +11,7 @@ describe('ImpalaSQL Delete Syntax Tests', () => {
|
||||
describe('DELETE', () => {
|
||||
features.deletes.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
dbs: readSQL(__dirname, 'drop_db.sql'),
|
||||
@ -16,42 +16,42 @@ describe('ImpalaSQL Drop Syntax Tests', () => {
|
||||
describe('DROP DATABASE', () => {
|
||||
features.dbs.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('DROP FUNCTION', () => {
|
||||
features.functions.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('DROP ROLE', () => {
|
||||
features.roles.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('DROP STATS', () => {
|
||||
features.stats.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('DROP TABLE', () => {
|
||||
features.tables.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('DROP VIEW', () => {
|
||||
features.views.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
insert: readSQL(__dirname, 'insert.sql'),
|
||||
@ -11,7 +11,7 @@ describe('ImpalaSQL Insert Syntax Tests', () => {
|
||||
describe('INSERT', () => {
|
||||
features.insert.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
computeStats: readSQL(__dirname, 'compute_stats.sql'),
|
||||
@ -23,91 +23,91 @@ describe('ImpalaSQL Other Syntax Tests', () => {
|
||||
describe('COMPUTE STATS', () => {
|
||||
features.computeStats.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('COMMENT STATEMENT', () => {
|
||||
features.comments.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('GRANT STATEMENT', () => {
|
||||
features.grants.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('REVOKE STATEMENT', () => {
|
||||
features.revokes.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('LOAD DATA STATEMENT', () => {
|
||||
features.loadData.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('DESCRIBE STATEMENT', () => {
|
||||
features.describes.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('EXPLAIN STATEMENT', () => {
|
||||
features.explains.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('INVALIDATE METADATA STATEMENT', () => {
|
||||
features.invalidates.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('SET STATEMENT', () => {
|
||||
features.set.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('SHUTDOWN STATEMENT', () => {
|
||||
features.shutdown.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('TRUNCATE TABLE STATEMENT', () => {
|
||||
features.truncate.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('USE STATEMENT', () => {
|
||||
features.use.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('VALUES STATEMENT', () => {
|
||||
features.values.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
refresh: readSQL(__dirname, 'refresh.sql'),
|
||||
@ -13,21 +13,21 @@ describe('ImpalaSQL Refresh Syntax Tests', () => {
|
||||
describe('REFRESH', () => {
|
||||
features.refresh.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('REFRESH AUTHORIZATION', () => {
|
||||
features.authorization.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('REFRESH FUNCTION', () => {
|
||||
features.function.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
select: readSQL(__dirname, 'select.sql'),
|
||||
@ -11,7 +11,7 @@ describe('ImpalaSQL Select Syntax Tests', () => {
|
||||
describe('SELECT', () => {
|
||||
features.select.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
shows: readSQL(__dirname, 'show.sql'),
|
||||
@ -11,7 +11,7 @@ describe('ImpalaSQL Show Syntax Tests', () => {
|
||||
describe('SHOW', () => {
|
||||
features.shows.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
update: readSQL(__dirname, 'update.sql'),
|
||||
@ -11,7 +11,7 @@ describe('ImpalaSQL Update Syntax Tests', () => {
|
||||
describe('UPDATE', () => {
|
||||
features.update.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import ImpalaSQL from 'src/parser/impala';
|
||||
import { ImpalaSQL } from 'src/parser/impala';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new ImpalaSQL();
|
||||
const impala = new ImpalaSQL();
|
||||
|
||||
const features = {
|
||||
update: readSQL(__dirname, 'upsert.sql'),
|
||||
@ -11,7 +11,7 @@ describe('ImpalaSQL Upsert Syntax Tests', () => {
|
||||
describe('UPSERT', () => {
|
||||
features.update.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(impala.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user