Interface RecordProviderBeta

Interface for providing records.

interface RecordProvider {
    getCount: (() => Promise<number>);
    getRecord: ((i: number) => Promise<Entity>);
    onDelete?: ((entity: Entity) => Promise<void>);
    getMessage(): Promise<undefined | string>;
}

Properties

getCount: (() => Promise<number>)

Retrieves the total count of records.

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      A promise that resolves to the number of records.

getRecord: ((i: number) => Promise<Entity>)

Retrieves a specific record by its index.

Type declaration

    • (i): Promise<Entity>
    • Parameters

      • i: number

        The index of the record to retrieve.

      Returns Promise<Entity>

      A promise that resolves to the requested record.

onDelete?: ((entity: Entity) => Promise<void>)

Optional method to handle deletion of a record.

Type declaration

    • (entity): Promise<void>
    • Parameters

      • entity: Entity

        The entity to delete.

      Returns Promise<void>

      A promise that resolves when the deletion is complete.

Methods

  • Beta

    Retrieves a message related to the records.

    Returns Promise<undefined | string>

    A promise that resolves to the message, or undefined if no message is available.