Options
All
  • Public
  • Public/Protected
  • All
Menu

MultiRangeBuilder is a query builder that looks up multiple keys.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected callOptions

callOptions: CallOptions | undefined

Protected Readonly namespace

namespace: NSApplicator

Protected request

request: IRangeRequest

Methods

all

  • all(): this

buffers

  • buffers(): Promise<{}>
  • Runs the built request and returns the value of the returned key as a buffers.

    Returns Promise<{}>

catch

  • catch<R>(onRejected: (err: any) => R | Promise<R>): Promise<{} | R>
  • catch implements Promiselike.catch()

    Type parameters

    • R

    Parameters

    • onRejected: (err: any) => R | Promise<R>
        • (err: any): R | Promise<R>
        • Parameters

          • err: any

          Returns R | Promise<R>

    Returns Promise<{} | R>

count

  • count(): Promise<number>
  • count returns the number of keys that match the query.

    Returns Promise<number>

Protected createPromise

  • createPromise(): Promise<{}>

exec

inRange

  • inRange instructs the builder to get keys in the specified byte range.

    Parameters

    Returns this

json

  • json(): Promise<{}>
  • Runs the built request and parses the returned keys as JSON.

    Returns Promise<{}>

keyBuffers

  • keyBuffers(): Promise<Buffer[]>
  • Keys returns an array of keys matching the query, as buffers.

    Returns Promise<Buffer[]>

keys

  • keys(encoding?: BufferEncoding): Promise<string[]>
  • Keys returns an array of keys matching the query.

    Parameters

    • Default value encoding: BufferEncoding = "utf8"

    Returns Promise<string[]>

limit

  • limit(count: number): this
  • Limit sets the maximum number of results to retrieve.

    Parameters

    • count: number

    Returns this

maxCreateRevision

  • maxCreateRevision(maxCreateRevision: number | string): this

maxModRevision

  • maxModRevision(maxModRevision: number | string): this

minCreateRevision

  • minCreateRevision(minCreateRevision: number | string): this

minModRevision

  • minModRevision(minModRevision: number | string): this

numbers

  • numbers(): Promise<{}>
  • Runs the built request and returns the values of keys as numbers. May resolve to NaN if the keys do not contain numbers.

    Returns Promise<{}>

op

options

  • options(options: CallOptions | undefined): this

prefix

  • prefix(value: string | Buffer): this
  • Prefix instructs the query to scan for all keys that have the provided prefix.

    Parameters

    • value: string | Buffer

    Returns this

revision

  • revision(rev: number | string): this
  • revision is the point-in-time of the key-value store to use for the range.

    Parameters

    • rev: number | string

    Returns this

serializable

  • serializable(serializable: boolean): this

sort

strings

  • strings(encoding?: BufferEncoding): Promise<{}>
  • Runs the built request and returns the value of the returned key as a string, or null if it isn't found.

    Parameters

    • Default value encoding: BufferEncoding = "utf8"

    Returns Promise<{}>

then

  • then<R, V>(onFulfilled: (value: {}) => R | Promise<R>, onRejected?: undefined | ((err: any) => V | Promise<V>)): Promise<R | V>
  • then implements Promiselike.then()

    Type parameters

    • R

    • V

    Parameters

    • onFulfilled: (value: {}) => R | Promise<R>
        • (value: {}): R | Promise<R>
        • Parameters

          • value: {}
            • [key: string]: string

          Returns R | Promise<R>

    • Optional onRejected: undefined | ((err: any) => V | Promise<V>)

    Returns Promise<R | V>

Legend

  • Constructor
  • Method
  • Inherited method

Generated using TypeDoc