UNPKG

mysql-all-in-one

Version:

A package that allows you to have a complete interaction with a MYSQL database, allowing to connect to the database, retrieve data and create queries.

40 lines (39 loc) 1.6 kB
import { SqlValues, SqlColumn } from '../../types'; export declare type ConditionOptions = ConditionOptionsArray | ConditionObject | Record<string, any> | undefined; export declare type ConditionOptionsArray = [ '__or' | ConditionOptions, ...ConditionOptions[] ]; export interface ConditionObject { __or?: boolean; __col_relation?: ColumnRelationObject; [k: string]: SqlValues | Array<SqlValues> | OperatorOptionsObject | ColumnRelationObject | SqlColumn | undefined; [y: number]: never; } export interface ColumnRelationObject { [k: string]: string; } export declare const isColumnRelationObject: (value: any) => value is ColumnRelationObject; export interface OperatorOptionsObject { like?: string | SqlColumn; notlike?: string | SqlColumn; rlike?: string | SqlColumn; notrlike?: string | SqlColumn; regexp?: string | SqlColumn; notregexp?: string | SqlColumn; between?: Array<string | number | Date | SqlColumn>; notbetween?: Array<string | number | Date | SqlColumn>; in?: Array<string | number | Date>; is?: SqlValues; isnot?: SqlValues; notin?: Array<string | number | Date>; '<=>'?: SqlValues; '>'?: string | number | Date | SqlColumn; '<'?: string | number | Date | SqlColumn; '>='?: string | number | Date | SqlColumn; '<='?: string | number | Date | SqlColumn; '<>'?: string | number | Date | SqlColumn; '!='?: string | number | Date | SqlColumn; '='?: string | number | Date | SqlColumn; } export declare const isOperatorOptionsObject: (val: any) => val is OperatorOptionsObject;