UNPKG

sedk-mysql

Version:
51 lines (50 loc) 1.96 kB
import { Artifacts } from '../steps/BaseStep'; import { Operator } from '../operators'; import { Binder, BinderArray, BinderStore } from '../binder'; import { BuilderData } from '../builder'; import { Column } from '../database'; import { Operand } from './Operand'; import { NonNullPrimitiveType, OperandType, PrimitiveType, ValueLike } from './types'; import { IStatementGiver } from './IStatementGiver'; import { Condition } from './Condition'; import { ItemInfo } from '../ItemInfo'; export declare enum ExpressionType { NOT_EXIST = 0, NULL = 1, BOOLEAN = 2, NUMBER = 3, TEXT = 4, DATE = 5, ARRAY = 6 } type ExpressionConstruction = { left: OperandType | Binder | OperandType[] | BinderArray; operator?: Operator; right?: OperandType; notLeft: boolean; notRight: boolean; }; export declare class Expression implements IStatementGiver { readonly leftOperand: Operand; readonly operator?: Operator; readonly rightOperand?: Operand; readonly type: ExpressionType; constructor(con: ExpressionConstruction); getStmt(data: BuilderData, artifacts: Artifacts, binderStore: BinderStore): string; as(alias: string): ItemInfo; eq(value: ValueLike): Condition; eq$(value: NonNullPrimitiveType): Condition; ne(value: ValueLike): Condition; ne$(value: NonNullPrimitiveType): Condition; isEq(value: PrimitiveType): Condition; isEq$(value: PrimitiveType): Condition; isNe(value: PrimitiveType): Condition; isNe$(value: PrimitiveType): Condition; getColumns(): Column[]; static getSimpleExp(left: OperandType | Binder | OperandType[] | BinderArray, notLeft?: boolean): Expression; static getComplexExp(left: OperandType | Binder | OperandType[] | BinderArray, operator: Operator, right: OperandType): Expression; private static getResultExpressionType; private static throwInvalidTypeError; private static isListComparisonOperator; } export {};