Options
All
  • Public
  • Public/Protected
  • All
Menu

@lumino/datastore - v0.18.4

Index

Type aliases

AnyField

AnyField: Field<ReadonlyJSONValue, ReadonlyJSONValue, ReadonlyJSONValue, ReadonlyJSONValue, ReadonlyJSONValue>

A type alias which is compatible with any field type.

Schema

Schema: object

A type definition for a table schema.

Notes

The datastore assumes that peers may safely collaborate on tables which share the same schema id.

The schema id must be changed whenever changes are made to the schema, or undefined behavior will result.

Type declaration

Functions

createDuplexId

  • createDuplexId(version: number, store: number): string
  • Create a duplex string identifier.

    Parameters

    • version: number

      The datastore version for the duplex id.

    • store: number

      The datastore id for the duplex id.

    Returns string

    A string duplex id for the given arguments.

    Notes

    ID format: <6-byte version><4-byte storeId>

createTriplexId

  • createTriplexId(version: number, store: number, lower: string, upper: string): string
  • Create a triplex string identifier between two boundaries.

    Parameters

    • version: number

      The datastore version for the triplex id.

    • store: number

      The datastore id for the triplex id.

    • lower: string

      The lower triplex boundary identifier or '' to represent the lowest-most boundary.

    • upper: string

      The upper triplex boundary identifier or '' to represent the upper-most boundary.

    Returns string

    A new triplex identifier between the two boundaries.

    Notes

    ID format: <6-byte path><6-byte version><4-byte storeId> * (N >= 1)

createTriplexIds

  • createTriplexIds(n: number, version: number, store: number, lower: string, upper: string): string[]
  • Create the multiple triplex identifiers.

    Parameters

    • n: number

      The number of identifiers to create.

    • version: number

      The datastore version.

    • store: number

      The datastore id.

    • lower: string

      The lower boundary identifier, exclusive.

    • upper: string

    Returns string[]

    The requested identifiers.

validateSchema

  • validateSchema(schema: Schema): string[]

Generated using TypeDoc