@resistdesign/voltra
    Preparing search index...

    Type Alias DataItemDBDriver<ItemType, UniquelyIdentifyingFieldName>

    The API for a database driver.

    type DataItemDBDriver<
        ItemType extends TypeInfoDataItem,
        UniquelyIdentifyingFieldName extends keyof ItemType,
    > = {
        createItem: (
            newItem: Partial<Omit<ItemType, UniquelyIdentifyingFieldName>>,
        ) => Promise<ItemType[UniquelyIdentifyingFieldName]>;
        deleteItem: (
            uniqueIdentifier: ItemType[UniquelyIdentifyingFieldName],
        ) => Promise<boolean>;
        listItems: (
            config: ListItemsConfig,
            selectedFields?: (keyof ItemType)[],
        ) => Promise<ListItemsResults<Partial<ItemType>>>;
        readItem: (
            uniqueIdentifier: ItemType[UniquelyIdentifyingFieldName],
            selectedFields?: (keyof ItemType)[],
        ) => Promise<Partial<ItemType>>;
        updateItem: (
            uniqueIdentifier: ItemType[UniquelyIdentifyingFieldName],
            updatedItem: Partial<ItemType>,
            updateConfig?: TypeInfoORMUpdateConfig,
        ) => Promise<boolean>;
    }

    Type Parameters

    Implemented by

    Index

    Properties

    createItem: (
        newItem: Partial<Omit<ItemType, UniquelyIdentifyingFieldName>>,
    ) => Promise<ItemType[UniquelyIdentifyingFieldName]>

    Create a new item in the data store.

    Type Declaration

    deleteItem: (
        uniqueIdentifier: ItemType[UniquelyIdentifyingFieldName],
    ) => Promise<boolean>

    Delete an item from the data store.

    Type Declaration

    listItems: (
        config: ListItemsConfig,
        selectedFields?: (keyof ItemType)[],
    ) => Promise<ListItemsResults<Partial<ItemType>>>

    List items from the data store.

    Type Declaration

    readItem: (
        uniqueIdentifier: ItemType[UniquelyIdentifyingFieldName],
        selectedFields?: (keyof ItemType)[],
    ) => Promise<Partial<ItemType>>

    Read an item from the data store.

    Type Declaration

    updateItem: (
        uniqueIdentifier: ItemType[UniquelyIdentifyingFieldName],
        updatedItem: Partial<ItemType>,
        updateConfig?: TypeInfoORMUpdateConfig,
    ) => Promise<boolean>

    Update an item in the data store.

    Type Declaration