Options
All
  • Public
  • Public/Protected
  • All
Menu

Project Replicache

Index

Type aliases

InitInput

InitInput: string | RequestInfo | URL | Response | BufferSource | WebAssembly.Module

This type is used for the ReplicacheOptions.wasmModule property.

JSONObject

JSONObject: Partial<{}>

A JSON object. We allow undefined values because in TypeScript there is no way to express optional missing properties vs properties with the value undefined.

JSONValue

JSONValue: null | string | boolean | number | Array<JSONValue> | JSONObject

The values that can be represented in JSON

KeyTypeForScanOptions

KeyTypeForScanOptions<O>: O extends { indexName: string } ? ScanOptionIndexedStartKey : string

If the options contains an indexName then the key type is a tuple of secondary and primary.

Type parameters

MaybePromise

MaybePromise<T>: T | Promise<T>

Type parameters

  • T

ScanIndexOptions

ScanIndexOptions: { indexName: string; limit?: number; prefix?: string; start?: { exclusive?: boolean; key: ScanOptionIndexedStartKey } }

Options for scan and scanAll when scanning over an index. When scanning over and index you need to provide the indexName and the start key is now a tuple consisting of secondar and primary key

Type declaration

  • indexName: string

    Do a scan over a named index. The indexName is the name of an index previously created with createIndex.

  • Optional limit?: number

    Only include up to limit results.

  • Optional prefix?: string

    Only include results starting with the secondary keys starting with prefix.

  • Optional start?: { exclusive?: boolean; key: ScanOptionIndexedStartKey }

    When provided the scan starts at this key.

ScanNoIndexOptions

ScanNoIndexOptions: { limit?: number; prefix?: string; start?: { exclusive?: boolean; key: string } }

Options for scan and scanAll when scanning over the entire key space.

Type declaration

  • Optional limit?: number

    Only include up to limit results.

  • Optional prefix?: string

    Only include keys starting with prefix.

  • Optional start?: { exclusive?: boolean; key: string }

    When provided the scan starts at this key.

    • Optional exclusive?: boolean

      Whether the key is exclusive or inclusive.

    • key: string

ScanOptionIndexedStartKey

ScanOptionIndexedStartKey: [secondary: string, primary?: string] | string

The key to start scanning at.

If you are scanning the primary index (i.e., you did not specify indexName), then pass a single string for this field, which is the key in the primary index to scan at.

If you are scanning a secondary index (i.e., you specified indexName), then use the tuple form. In that case, secondary is the secondary key to start scanning at, and primary (if any) is the primary key to start scanning at.

ScanOptions

Options for scan and scanAll

Generated using TypeDoc