idb-ts
    Preparing search index...

    Interface KeyPathOptions

    Configuration options for the KeyPath and CompositeKeyPath decorators, controlling key generation behaviour.

    interface KeyPathOptions {
        autoIncrement?: boolean;
        generator?:
            | "uuid"
            | "timestamp"
            | "random"
            | ((item?: any) => string | number);
    }
    Index

    Properties

    autoIncrement?: boolean

    When true, the object store is created with autoIncrement: true and the browser assigns a monotonically increasing numeric key on each add.

    false
    
    generator?: "uuid" | "timestamp" | "random" | ((item?: any) => string | number)

    Key generator to invoke when creating a record whose key field is absent or empty.