UNPKG

@rstore/nuxt-drizzle

Version:
39 lines (38 loc) 1.39 kB
import type { Model, ModelDefaults, ModelList } from '@rstore/shared'; export interface RestoreDrizzleConditionModifier { operator: 'not'; condition: RstoreDrizzleCondition; } export interface RstoreDrizzleUnaryOperator { operator: 'isNull' | 'isNotNull'; field: string; } export interface RstoreDrizzleBinaryOperator { operator: 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'inArray' | 'notInArray' | 'like' | 'notLike' | 'ilike' | 'notIlike' | 'arrayContains' | 'arrayContained' | 'arrayOverlaps'; field: string; value: any; } export interface RstoreDrizzleTernaryOperator { operator: 'between' | 'notBetween'; field: string; value1: any; value2: any; } export interface RstoreDrizzleConditionGroup { operator: 'and' | 'or'; conditions: Array<RstoreDrizzleCondition>; } export type RstoreDrizzleCondition = RestoreDrizzleConditionModifier | RstoreDrizzleUnaryOperator | RstoreDrizzleBinaryOperator | RstoreDrizzleTernaryOperator | RstoreDrizzleConditionGroup | undefined; declare module '@rstore/vue' { interface CustomModelMeta { scopeId?: string; table?: string; primaryKeys?: string[]; } interface CustomParams<TModel extends Model, TModelDefaults extends ModelDefaults, TModelList extends ModelList> { where?: RstoreDrizzleCondition; } interface CustomHookMeta { } } export {};