Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface QuerySingle<M, T>

Type parameters

Hierarchy

  • PromiseLike<T>
    • QuerySingle

Implemented by

Index

Methods

  • cache(options: undefined | { key: string; refresh?: boolean; ttl: number }): QuerySingle<M, T>
  • count(): PromiseLike<number>
  • delete(options?: any): PromiseLike<number>
  • exec(options?: { skip_log?: boolean }): PromiseLike<T>
  • explain(): PromiseLike<any>
  • group<G, F>(group_by: G | G[], fields?: F): QuerySingle<M, { [ field in string | number | symbol]: number } & Pick<M, G>>
  • group<F>(group_by: null, fields?: F): QuerySingle<M, { [ field in string | number | symbol]: number }>
  • group<U>(group_by: null | string, fields?: object): QuerySingle<M, U>
  • include(column: string, select?: string): QuerySingle<M, T>
  • join(model: typeof BaseModel, options?: { alias?: string; base_column?: string; join_column?: string }): QuerySingle<M, T>
  • Parameters

    • model: typeof BaseModel
    • Optional options: { alias?: string; base_column?: string; join_column?: string }
      • Optional alias?: string
      • Optional base_column?: string
      • Optional join_column?: string

    Returns QuerySingle<M, T>

  • left_outer_join(model: typeof BaseModel, options?: { alias?: string; base_column?: string; join_column?: string }): QuerySingle<M, T>
  • Parameters

    • model: typeof BaseModel
    • Optional options: { alias?: string; base_column?: string; join_column?: string }
      • Optional alias?: string
      • Optional base_column?: string
      • Optional join_column?: string

    Returns QuerySingle<M, T>

  • one(): QuerySingleNull<M, T>
  • stream(): Readable
  • then<TResult1, TResult2>(onfulfilled?: null | ((value: T) => TResult1 | PromiseLike<TResult1>), onrejected?: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)): PromiseLike<TResult1 | TResult2>
  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type parameters

    • TResult1 = T

    • TResult2 = never

    Parameters

    • Optional onfulfilled: null | ((value: T) => TResult1 | PromiseLike<TResult1>)

      The callback to execute when the Promise is resolved.

    • Optional onrejected: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)

      The callback to execute when the Promise is rejected.

    Returns PromiseLike<TResult1 | TResult2>

    A Promise for the completion of which ever callback is executed.

  • update(updates: object): PromiseLike<number>
  • upsert(updates: object, options?: { ignore_on_update: string[] }): PromiseLike<void>
  • Parameters

    • updates: object
    • Optional options: { ignore_on_update: string[] }
      • ignore_on_update: string[]

    Returns PromiseLike<void>

Generated using TypeDoc