Options
All
  • Public
  • Public/Protected
  • All
Menu

Replicache

Index

Type aliases

Invoker

Invoker: { invoke: REPMInvoke }
deprecated

Type declaration

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

Mutator

Mutator<Return, Args>: (args: Args) => Promise<Return | void>
deprecated

This type wasn't exact enough as described

Type parameters

  • Return: JSONValue | void

  • Args: JSONValue

Type declaration

    • (args: Args): Promise<Return | void>
    • Parameters

      • args: Args

      Returns Promise<Return | void>

ScanIndexOptions

ScanIndexOptions: { indexName: string; limit?: undefined | number; prefix?: undefined | string; start?: undefined | { exclusive?: undefined | false | true; 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 needs to match an index created with createIndex.

  • Optional limit?: undefined | number

    Only include up to limit results.

  • Optional prefix?: undefined | string

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

  • Optional start?: undefined | { exclusive?: undefined | false | true; key: ScanOptionIndexedStartKey }

    When provided the scan starts at this key.

ScanNoIndexOptions

ScanNoIndexOptions: { limit?: undefined | number; prefix?: undefined | string; start?: undefined | { exclusive?: undefined | false | true; key: string } }

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

Type declaration

  • Optional limit?: undefined | number

    Only include up to limit results.

  • Optional prefix?: undefined | string

    Only include keys starting with prefix.

  • Optional start?: undefined | { exclusive?: undefined | false | true; key: string }

    When provided the scan starts at this key.

ScanOptionIndexedStartKey

ScanOptionIndexedStartKey: [] | string

When providing a start key for an indexed scan you need to provide the secondary index to start scan at. You may also provide a primary index. If you pass a string, then that is the key for the secondary index. If you provide tuple then this is the secondary key followed by the primary key.

ScanOptions

Options for scan and scanAll

Generated using TypeDoc