Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

Hierarchy

Implements

Index

Constructors

constructor

Properties

adj

adj: rangeAdjacent = this.rangeAdjacent
deprecated

Use rangeAdjacent() instead.

Protected allowEmpty

allowEmpty: boolean

Protected Optional body

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

cd

cd: containedBy = this.containedBy
deprecated

Use containedBy() instead.

cs

cs: contains = this.contains
deprecated

Use contains() instead.

Protected fetch

fetch: Fetch

Protected headers

headers: {}

Type declaration

  • [key: string]: string

Protected method

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

nxl

nxl: rangeGte = this.rangeGte
deprecated

Use rangeGte() instead.

nxr

nxr: rangeLte = this.rangeLte
deprecated

Use rangeLte() instead.

ov

ov: overlaps = this.overlaps
deprecated

Use overlaps() instead.

Protected Optional schema

schema: undefined | string

Protected shouldThrowOnError

shouldThrowOnError: boolean

Protected Optional signal

signal: AbortSignal

sl

sl: rangeLt = this.rangeLt
deprecated

Use rangeLt() instead.

sr

sr: rangeGt = this.rangeGt
deprecated

Use rangeGt() instead.

Protected url

url: URL

Methods

abortSignal

  • abortSignal(signal: AbortSignal): this

containedBy

  • containedBy(column: keyof T, value: string | T[keyof T][] | object): this
  • Finds all rows whose json, array, or range value on the stated column is contained by the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: string | T[keyof T][] | object

      The value to filter with.

    Returns this

contains

  • contains(column: keyof T, value: string | T[keyof T][] | object): this
  • Finds all rows whose json, array, or range value on the stated column contains the values specified in value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: string | T[keyof T][] | object

      The value to filter with.

    Returns this

csv

eq

  • eq(column: keyof T, value: T[keyof T]): this
  • Finds all rows whose value on the stated column exactly matches the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: T[keyof T]

      The value to filter with.

    Returns this

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>>>

filter

  • Finds all rows whose column satisfies the filter.

    Parameters

    • column: keyof T

      The column to filter on.

    • operator: FilterOperator

      The operator to filter with.

    • value: any

      The value to filter with.

    Returns this

fts

  • fts(column: keyof T, query: string, __namedParameters?: { config: undefined | string }): this
  • Finds all rows whose tsvector value on the stated column matches to_tsquery(query).

    deprecated

    Use textSearch() instead.

    Parameters

    • column: keyof T

      The column to filter on.

    • query: string

      The Postgres tsquery string to filter with.

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

        The text search configuration to use.

    Returns this

geojson

gt

  • gt(column: keyof T, value: T[keyof T]): this
  • Finds all rows whose value on the stated column is greater than the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: T[keyof T]

      The value to filter with.

    Returns this

gte

  • gte(column: keyof T, value: T[keyof T]): this
  • Finds all rows whose value on the stated column is greater than or equal to the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: T[keyof T]

      The value to filter with.

    Returns this

ilike

  • ilike(column: keyof T, pattern: string): this
  • Finds all rows whose value in the stated column matches the supplied pattern (case insensitive).

    Parameters

    • column: keyof T

      The column to filter on.

    • pattern: string

      The pattern to filter with.

    Returns this

in

  • in(column: keyof T, values: T[keyof T][]): this
  • Finds all rows whose value on the stated column is found on the specified values.

    Parameters

    • column: keyof T

      The column to filter on.

    • values: T[keyof T][]

      The values to filter with.

    Returns this

is

  • is(column: keyof T, value: boolean | null): this
  • A check for exact equality (null, true, false), finds all rows whose value on the stated column exactly match the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: boolean | null

      The value to filter with.

    Returns this

like

  • like(column: keyof T, pattern: string): this
  • Finds all rows whose value in the stated column matches the supplied pattern (case sensitive).

    Parameters

    • column: keyof T

      The column to filter on.

    • pattern: string

      The pattern to filter with.

    Returns this

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

lt

  • lt(column: keyof T, value: T[keyof T]): this
  • Finds all rows whose value on the stated column is less than the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: T[keyof T]

      The value to filter with.

    Returns this

lte

  • lte(column: keyof T, value: T[keyof T]): this
  • Finds all rows whose value on the stated column is less than or equal to the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: T[keyof T]

      The value to filter with.

    Returns this

match

  • match(query: Record<string, unknown>): this
  • Finds all rows whose columns match the specified query object.

    Parameters

    • query: Record<string, unknown>

      The object to filter with, with column names as keys mapped to their filter values.

    Returns this

maybeSingle

neq

  • neq(column: keyof T, value: T[keyof T]): this
  • Finds all rows whose value on the stated column doesn't match the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: T[keyof T]

      The value to filter with.

    Returns this

not

  • Finds all rows which doesn't satisfy the filter.

    Parameters

    • column: keyof T

      The column to filter on.

    • operator: FilterOperator

      The operator to filter with.

    • value: any

      The value to filter with.

    Returns this

or

  • or(filters: string, __namedParameters?: { foreignTable: undefined | string }): this
  • Finds all rows satisfying at least one of the filters.

    Parameters

    • filters: string

      The filters to use, separated by commas.

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

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

    Returns this

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

overlaps

  • overlaps(column: keyof T, value: string | T[keyof T][]): this
  • Finds all rows whose array or range value on the stated column overlaps (has a value in common) with the specified value.

    Parameters

    • column: keyof T

      The column to filter on.

    • value: string | T[keyof T][]

      The value to filter with.

    Returns this

phfts

  • phfts(column: keyof T, query: string, __namedParameters?: { config: undefined | string }): this
  • Finds all rows whose tsvector value on the stated column matches phraseto_tsquery(query).

    deprecated

    Use textSearch() with type: 'phrase' instead.

    Parameters

    • column: keyof T

      The column to filter on.

    • query: string

      The Postgres tsquery string to filter with.

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

        The text search configuration to use.

    Returns this

plfts

  • plfts(column: keyof T, query: string, __namedParameters?: { config: undefined | string }): this
  • Finds all rows whose tsvector value on the stated column matches plainto_tsquery(query).

    deprecated

    Use textSearch() with type: 'plain' instead.

    Parameters

    • column: keyof T

      The column to filter on.

    • query: string

      The Postgres tsquery string to filter with.

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

        The text search configuration to use.

    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

rangeAdjacent

  • rangeAdjacent(column: keyof T, range: string): this
  • Finds all rows whose range value on the stated column is adjacent to the specified range.

    Parameters

    • column: keyof T

      The column to filter on.

    • range: string

      The range to filter with.

    Returns this

rangeGt

  • rangeGt(column: keyof T, range: string): this
  • Finds all rows whose range value on the stated column is strictly to the right of the specified range.

    Parameters

    • column: keyof T

      The column to filter on.

    • range: string

      The range to filter with.

    Returns this

rangeGte

  • rangeGte(column: keyof T, range: string): this
  • Finds all rows whose range value on the stated column does not extend to the left of the specified range.

    Parameters

    • column: keyof T

      The column to filter on.

    • range: string

      The range to filter with.

    Returns this

rangeLt

  • rangeLt(column: keyof T, range: string): this
  • Finds all rows whose range value on the stated column is strictly to the left of the specified range.

    Parameters

    • column: keyof T

      The column to filter on.

    • range: string

      The range to filter with.

    Returns this

rangeLte

  • rangeLte(column: keyof T, range: string): this
  • Finds all rows whose range value on the stated column does not extend to the right of the specified range.

    Parameters

    • column: keyof T

      The column to filter on.

    • range: string

      The range to filter with.

    Returns this

select

  • select(columns?: string): this

single

textSearch

  • textSearch(column: keyof T, query: string, __namedParameters?: { config: undefined | string; type: null | "plain" | "phrase" | "websearch" }): this
  • Finds all rows whose text or tsvector value on the stated column matches the tsquery in query.

    Parameters

    • column: keyof T

      The column to filter on.

    • query: string

      The Postgres tsquery string to filter with.

    • Default value __namedParameters: { config: undefined | string; type: null | "plain" | "phrase" | "websearch" } = {}
      • config: undefined | string

        The text search configuration to use.

      • type: null | "plain" | "phrase" | "websearch"

        The type of tsquery conversion to use on query.

    Returns this

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

wfts

  • wfts(column: keyof T, query: string, __namedParameters?: { config: undefined | string }): this
  • Finds all rows whose tsvector value on the stated column matches websearch_to_tsquery(query).

    deprecated

    Use textSearch() with type: 'websearch' instead.

    Parameters

    • column: keyof T

      The column to filter on.

    • query: string

      The Postgres tsquery string to filter with.

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

        The text search configuration to use.

    Returns this

Generated using TypeDoc