sql-ddl-to-json-schema
Version:
Parse and convert SQL DDL statements to a JSON Schema.
27 lines (26 loc) • 739 B
TypeScript
import { P_DROP_TABLE } from '../../../../../typings';
import { DatabaseModelInterface, TableModelInterface, RuleHandler } from '../typings';
/**
* Formatter for P_DROP_TABLE rule's parsed JSON.
*/
export declare class DropTable implements RuleHandler {
database: DatabaseModelInterface;
/**
* Get table with given name.
*
* @param name Table name.
*/
getTable(name: string): TableModelInterface | undefined;
/**
* Setter for database.
*
* @param database Database instance.
*/
setDatabase(database: DatabaseModelInterface): void;
/**
* Drops one of the tables.
*
* @param json JSON format parsed from SQL.
*/
handleDef(json: P_DROP_TABLE): void;
}