UNPKG

sql-ddl-to-json-schema

Version:

Parse and convert SQL DDL statements to a JSON Schema.

27 lines (26 loc) 773 B
import { P_CREATE_INDEX } from '../../../../../typings'; import { TableModelInterface, DatabaseModelInterface, RuleHandler } from '../typings'; /** * Formatter for P_CREATE_INDEX rule's parsed JSON. */ export declare class CreateIndex 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; /** * Creates an index and adds it to one of the tables. * * @param json JSON format parsed from SQL. */ handleDef(json: P_CREATE_INDEX): void; }