import { JSONSchema7 } from 'json-schema'; import { ColumnInterface as CompactFormatColumnInterface } from '../../../../typings'; import { Datatype } from './datatype'; /** * Table column. */ export declare class Column { name: string; datatype: Datatype; isNullable?: boolean; isPrimaryKey?: boolean; comment?: string; default?: boolean | string | number | null; /** * Create Column instance from compact JSON format. * * @param json Column in compact JSON format. */ static fromCompactJson(json: CompactFormatColumnInterface): Column; /** * Map a BOOLEAN column default to a JSON boolean. MySQL stores BOOLEAN as * TINYINT(1), so TRUE/FALSE and 1/0 are equivalent. Other values are kept. * * @param value Default value from compact JSON format. */ static toBooleanDefault(value: string | number | null): boolean | string | number | null; /** * JSON casting of this object calls this method. */ toJSON(): JSONSchema7; }