import { Attribute, Table } from "./db"; import { Aggregation, Joins, Modifier } from "./dbStructure"; import { selectQuery } from "./query"; export type primaryData = string | number | boolean | null; export type allModifierInput = primaryData | Modifier | selectQuery | Attribute | Aggregation; export type selectElements = primaryData | Attribute | Aggregation | selectQuery export type selectFromElements = Table | Joins | null; export type serializeReturn = [string, primaryData[]]; export type attributeSettings = { unique?: boolean, autoIncrement?: boolean, default?: primaryData, notNull?: boolean primaryKey?: boolean, foreginKey?: { link: Attribute, onDelete?: onAction, onUpdate?: onAction } }; export enum onAction { cascade, noAction, setNull, setDefault }