sql-ddl-to-json-schema
Version:
Parse and convert SQL DDL statements to a JSON Schema.
31 lines (30 loc) • 887 B
TypeScript
import { P_INDEX_COLUMN, IndexColumnInterface } from '../../../../typings';
import { IndexColumnModelInterface } from './typings';
/**
* Index specification of a column.
*/
export declare class IndexColumn implements IndexColumnModelInterface {
column?: string;
length?: number;
sort?: string;
/**
* Creates an index column from a JSON def.
*
* @param json JSON format parsed from SQL.
*/
static fromDef(json: P_INDEX_COLUMN): IndexColumn;
/**
* Creates an index column from an object containing needed properties.
*
* @param json Object containing properties.
*/
static fromObject(json: P_INDEX_COLUMN['def']): IndexColumn;
/**
* JSON casting of this object calls this method.
*/
toJSON(): IndexColumnInterface;
/**
* Create a deep clone of this model.
*/
clone(): IndexColumn;
}