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 HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
aborts: readSQL(__dirname, 'abort.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Abort Syntax Tests', () => {
|
||||
features.aborts.forEach((ab) => {
|
||||
it(ab, () => {
|
||||
expect(parser.validate(ab).length).toBe(0);
|
||||
expect(hive.validate(ab).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
databases: readSQL(__dirname, 'alterDatabase.sql'),
|
||||
@ -16,7 +16,7 @@ describe('HiveSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER DATABASE', () => {
|
||||
features.databases.forEach((db) => {
|
||||
it(db, () => {
|
||||
expect(parser.validate(db).length).toBe(0);
|
||||
expect(hive.validate(db).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -24,7 +24,7 @@ describe('HiveSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER CONNECTOR', () => {
|
||||
features.connectors.forEach((ctors) => {
|
||||
it(ctors, () => {
|
||||
expect(parser.validate(ctors).length).toBe(0);
|
||||
expect(hive.validate(ctors).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -32,7 +32,7 @@ describe('HiveSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER TABLE', () => {
|
||||
features.tables.forEach((tb) => {
|
||||
it(tb, () => {
|
||||
expect(parser.validate(tb).length).toBe(0);
|
||||
expect(hive.validate(tb).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -40,7 +40,7 @@ describe('HiveSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER INDEX', () => {
|
||||
features.indexes.forEach((index) => {
|
||||
it(index, () => {
|
||||
expect(parser.validate(index).length).toBe(0);
|
||||
expect(hive.validate(index).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -48,7 +48,7 @@ describe('HiveSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER VIEW', () => {
|
||||
features.views.forEach((view) => {
|
||||
it(view, () => {
|
||||
expect(parser.validate(view).length).toBe(0);
|
||||
expect(hive.validate(view).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -56,7 +56,7 @@ describe('HiveSQL Alter Syntax Tests', () => {
|
||||
describe('ALTER SCHEDULE QUERY', () => {
|
||||
features.scheduleQueries.forEach((sq) => {
|
||||
it(sq, () => {
|
||||
expect(parser.validate(sq).length).toBe(0);
|
||||
expect(hive.validate(sq).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
manageRoles: readSQL(__dirname, 'authorization.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Related To Authorization Tests', () => {
|
||||
features.manageRoles.forEach((manageRole) => {
|
||||
it(manageRole, () => {
|
||||
expect(parser.validate(manageRole).length).toBe(0);
|
||||
expect(hive.validate(manageRole).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
databases: readSQL(__dirname, 'createDatabase.sql'),
|
||||
@ -19,7 +19,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE DATABASE', () => {
|
||||
features.databases.forEach((database) => {
|
||||
it(database, () => {
|
||||
expect(parser.validate(database).length).toBe(0);
|
||||
expect(hive.validate(database).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -27,7 +27,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE TABLE', () => {
|
||||
features.tables.forEach((table) => {
|
||||
it(table, () => {
|
||||
expect(parser.validate(table).length).toBe(0);
|
||||
expect(hive.validate(table).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -35,7 +35,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE VIEW', () => {
|
||||
features.views.forEach((view) => {
|
||||
it(view, () => {
|
||||
expect(parser.validate(view).length).toBe(0);
|
||||
expect(hive.validate(view).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -43,7 +43,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE FUNCTION', () => {
|
||||
features.functions.forEach((func) => {
|
||||
it(func, () => {
|
||||
expect(parser.validate(func).length).toBe(0);
|
||||
expect(hive.validate(func).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -51,7 +51,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE ROLE', () => {
|
||||
features.roles.forEach((role) => {
|
||||
it(role, () => {
|
||||
expect(parser.validate(role).length).toBe(0);
|
||||
expect(hive.validate(role).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -59,7 +59,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE INDEX', () => {
|
||||
features.indexes.forEach((index) => {
|
||||
it(index, () => {
|
||||
expect(parser.validate(index).length).toBe(0);
|
||||
expect(hive.validate(index).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -67,7 +67,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE MACRO', () => {
|
||||
features.macros.forEach((macro) => {
|
||||
it(macro, () => {
|
||||
expect(parser.validate(macro).length).toBe(0);
|
||||
expect(hive.validate(macro).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -75,7 +75,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE CONNECTOR', () => {
|
||||
features.connectors.forEach((cnctor) => {
|
||||
it(cnctor, () => {
|
||||
expect(parser.validate(cnctor).length).toBe(0);
|
||||
expect(hive.validate(cnctor).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -83,7 +83,7 @@ describe('HiveSQL Create Syntax Tests', () => {
|
||||
describe('CREATE SCHEDULE QUERY', () => {
|
||||
features.scheduledQueries.forEach((sq) => {
|
||||
it(sq, () => {
|
||||
expect(parser.validate(sq).length).toBe(0);
|
||||
expect(hive.validate(sq).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
dataTypes: readSQL(__dirname, 'dataTypes.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Check Data Types Tests', () => {
|
||||
features.dataTypes.forEach((dataType) => {
|
||||
it(dataType, () => {
|
||||
expect(parser.validate(dataType).length).toBe(0);
|
||||
expect(hive.validate(dataType).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
deletes: readSQL(__dirname, 'delete.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Delete Syntax Tests', () => {
|
||||
features.deletes.forEach((del) => {
|
||||
it(del, () => {
|
||||
expect(parser.validate(del).length).toBe(0);
|
||||
expect(hive.validate(del).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
desc: readSQL(__dirname, 'describe.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Describe Syntax Tests', () => {
|
||||
features.desc.forEach((des) => {
|
||||
it(des, () => {
|
||||
expect(parser.validate(des).length).toBe(0);
|
||||
expect(hive.validate(des).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
drops: readSQL(__dirname, 'drop.sql'),
|
||||
@ -11,13 +11,13 @@ const features = {
|
||||
describe('HiveSQL Drop Syntax Tests', () => {
|
||||
features.drops.forEach((drop) => {
|
||||
it(drop, () => {
|
||||
expect(parser.validate(drop).length).toBe(0);
|
||||
expect(hive.validate(drop).length).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
features.reloads.forEach((reload) => {
|
||||
it(reload, () => {
|
||||
expect(parser.validate(reload).length).toBe(0);
|
||||
expect(hive.validate(reload).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const features = {
|
||||
@ -6,11 +6,11 @@ const features = {
|
||||
};
|
||||
|
||||
describe('HiveSQL Export Syntax Tests', () => {
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
features.exports.forEach((exp) => {
|
||||
it(exp, () => {
|
||||
expect(parser.validate(exp).length).toBe(0);
|
||||
expect(hive.validate(exp).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const features = {
|
||||
@ -6,11 +6,11 @@ const features = {
|
||||
};
|
||||
|
||||
describe('HiveSQL Import Syntax Tests', () => {
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
features.imports.forEach((imp) => {
|
||||
it(imp, () => {
|
||||
expect(parser.validate(imp).length).toBe(0);
|
||||
expect(hive.validate(imp).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
insertFromQueries: readSQL(__dirname, 'insertFromQuery.sql'),
|
||||
@ -11,13 +11,13 @@ const features = {
|
||||
describe('HiveSQL Insert Syntax Tests', () => {
|
||||
features.insertFromQueries.forEach((ifq) => {
|
||||
it(ifq, () => {
|
||||
expect(parser.validate(ifq).length).toBe(0);
|
||||
expect(hive.validate(ifq).length).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
features.insertFromValues.forEach((ifv) => {
|
||||
it(ifv, () => {
|
||||
expect(parser.validate(ifv).length).toBe(0);
|
||||
expect(hive.validate(ifv).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
loads: readSQL(__dirname, 'load.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Load Syntax Tests', () => {
|
||||
features.loads.forEach((load) => {
|
||||
it(load, () => {
|
||||
expect(parser.validate(load).length).toBe(0);
|
||||
expect(hive.validate(load).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
merges: readSQL(__dirname, 'merge.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Merge Syntax Tests', () => {
|
||||
features.merges.forEach((merge) => {
|
||||
it(merge, () => {
|
||||
expect(parser.validate(merge).length).toBe(0);
|
||||
expect(hive.validate(merge).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
selects: readSQL(__dirname, 'select.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Select Syntax Tests', () => {
|
||||
features.selects.forEach((select) => {
|
||||
it(select, () => {
|
||||
expect(parser.validate(select).length).toBe(0);
|
||||
expect(hive.validate(select).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
shows: readSQL(__dirname, 'show.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Show Syntax Tests', () => {
|
||||
features.shows.forEach((show) => {
|
||||
it(show, () => {
|
||||
expect(parser.validate(show).length).toBe(0);
|
||||
expect(hive.validate(show).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
import HiveSQL from 'src/parser/hive';
|
||||
import { HiveSQL } from 'src/parser/hive';
|
||||
import { readSQL } from 'test/helper';
|
||||
|
||||
const parser = new HiveSQL();
|
||||
const hive = new HiveSQL();
|
||||
|
||||
const features = {
|
||||
updates: readSQL(__dirname, 'update.sql'),
|
||||
@ -10,7 +10,7 @@ const features = {
|
||||
describe('HiveSQL Update Syntax Tests', () => {
|
||||
features.updates.forEach((update) => {
|
||||
it(update, () => {
|
||||
expect(parser.validate(update).length).toBe(0);
|
||||
expect(hive.validate(update).length).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user