sedk-mysql
Version:
Simple SQL builder and validator for MySQL
24 lines (23 loc) • 1.14 kB
TypeScript
import { AggregateFunction } from '../../AggregateFunction';
import { Binder } from '../../binder';
import { Column } from '../../database';
import { ItemInfo } from '../../ItemInfo';
import { Expression, PrimitiveType } from '../../models';
import { All, Asterisk, Distinct } from '../../singletoneConstants';
import { Artifacts, BaseStep } from '../BaseStep';
import { FromItems, SelectFromStep } from './SelectFromStep';
import { TableAsterisk } from '../../TableAsterisk';
export type ColumnLike = Column | Expression;
export type SelectItem = ColumnLike | AggregateFunction | Binder | Asterisk | TableAsterisk;
export declare class SelectStep extends BaseStep {
readonly items: (ItemInfo | SelectItem | PrimitiveType)[];
private readonly distinct?;
constructor(prevStep: BaseStep, items: (Distinct | All | ItemInfo | SelectItem | PrimitiveType)[]);
getStepStatement(artifacts?: Artifacts): string;
getStepArtifacts(): Artifacts;
getAliases(): string[];
from(...tables: FromItems): SelectFromStep;
private getColumns;
private isSelectItemInfo;
private static throwIfMoreThanOneDistinctOrAll;
}