Function default

  • Query helper

    Returns

    An helper object usable as tagged template parameter in sql queries

    Type Parameters

    • T

    • K extends readonly string[] | readonly [] | readonly never[] | readonly (string & keyof T)[]

    Parameters

    • first: T & First<T, K, never>

      Define how the helper behave

    • Rest ...rest: K

      Other optional arguments, depending on the helper type

    Returns Return<T, K>

  • Execute the SQL query passed as a template string. Can only be used as template string tag.

    Returns

    A promise resolving to the result of your query

    Type Parameters

    • T extends readonly (undefined | object)[] = Row[]

    Parameters

    • template: TemplateStringsArray

      The template generated from the template string

    • Rest ...parameters: readonly ParameterOrFragment<never>[]

      Interpoled values of the template string

    Returns PendingQuery<T>

Generated using TypeDoc