sql-ddl-to-json-schema
Version:
Parse and convert SQL DDL statements to a JSON Schema.
23 lines (22 loc) • 797 B
TypeScript
import { P_COLUMN_REFERENCE, ColumnReferenceInterface } from '../../../../typings';
import { ColumnReferenceModelInterface, IndexColumnModelInterface, ColumnReferenceOnModelInterface } from './typings';
/**
* Column reference to another column in foreign keys.
*/
export declare class ColumnReference implements ColumnReferenceModelInterface {
table: string;
match?: string;
columns: IndexColumnModelInterface[];
on: ColumnReferenceOnModelInterface[];
/**
* Creates a column reference from a JSON def.
*
* @param json JSON format parsed from SQL.
*/
static fromDef(json: P_COLUMN_REFERENCE): ColumnReference;
/**
* JSON casting of this object calls this method.
*/
toJSON(): ColumnReferenceInterface;
clone(): ColumnReference;
}