Options
All
  • Public
  • Public/Protected
  • All
Menu

Post-filters (transforms)

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected allowEmpty

allowEmpty: boolean

Protected Optional body

body: Partial<T> | Partial<T>[]

Protected fetch

fetch: Fetch

Protected headers

headers: {}

Type declaration

  • [key: string]: string

Protected method

method: "GET" | "HEAD" | "POST" | "PATCH" | "DELETE"

Protected Optional schema

schema: undefined | string

Protected shouldThrowOnError

shouldThrowOnError: boolean

Protected Optional signal

signal: AbortSignal

Protected url

url: URL

Methods

abortSignal

  • abortSignal(signal: AbortSignal): this

csv

explain

  • explain(__namedParameters?: { analyze: boolean; buffers: boolean; settings: boolean; verbose: boolean; wal: boolean }): PromiseLike<PostgrestResponse<Record<string, unknown>>>
  • Obtains the EXPLAIN plan for this request.

    Parameters

    • Default value __namedParameters: { analyze: boolean; buffers: boolean; settings: boolean; verbose: boolean; wal: boolean } = {}
      • analyze: boolean

        If true, the query will be executed and the actual run time will be displayed.

      • buffers: boolean

        If true, include information on buffer usage.

      • settings: boolean

        If true, include information on configuration parameters that affect query planning.

      • verbose: boolean

        If true, the query identifier will be displayed and the result will include the output columns of the query.

      • wal: boolean

        If true, include information on WAL record generation

    Returns PromiseLike<PostgrestResponse<Record<string, unknown>>>

geojson

limit

  • limit(count: number, __namedParameters?: { foreignTable: undefined | string }): this
  • Limits the result with the specified count.

    Parameters

    • count: number

      The maximum no. of rows to limit to.

    • Default value __namedParameters: { foreignTable: undefined | string } = {}
      • foreignTable: undefined | string

        The foreign table to use (for foreign columns).

    Returns this

maybeSingle

order

  • order(column: keyof T, __namedParameters?: { ascending: boolean; foreignTable: undefined | string; nullsFirst: boolean }): this
  • Orders the result with the specified column.

    Parameters

    • column: keyof T

      The column to order on.

    • Default value __namedParameters: { ascending: boolean; foreignTable: undefined | string; nullsFirst: boolean } = {}
      • ascending: boolean

        If true, the result will be in ascending order.

      • foreignTable: undefined | string

        The foreign table to use (if column is a foreign column).

      • nullsFirst: boolean

        If true, nulls appear first.

    Returns this

range

  • range(from: number, to: number, __namedParameters?: { foreignTable: undefined | string }): this
  • Limits the result to rows within the specified range, inclusive.

    Parameters

    • from: number

      The starting index from which to limit the result, inclusive.

    • to: number

      The last index to which to limit the result, inclusive.

    • Default value __namedParameters: { foreignTable: undefined | string } = {}
      • foreignTable: undefined | string

        The foreign table to use (for foreign columns).

    Returns this

select

  • select(columns?: string): this
  • Performs vertical filtering with SELECT.

    Parameters

    • Default value columns: string = "*"

      The columns to retrieve, separated by commas.

    Returns this

single

then

  • then<TResult1, TResult2>(onfulfilled?: ((value: PostgrestResponse<T>) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>
  • Type parameters

    • TResult1 = PostgrestResponse<T>

    • TResult2 = never

    Parameters

    • Optional onfulfilled: ((value: PostgrestResponse<T>) => TResult1 | PromiseLike<TResult1>) | undefined | null
    • Optional onrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null

    Returns PromiseLike<TResult1 | TResult2>

throwOnError

  • throwOnError(throwOnError?: undefined | false | true): this

Generated using TypeDoc