Type Alias IDatabaseLockTransaction

IDatabaseLockTransaction: {
    find(key: string): Promise<null | ILockData>;
    upsert(key: string, lockId: string, expiration: null | Date): Promise<void>;
}

IMPORT_PATH: "@daiso-tech/core/lock/contracts"

Type declaration

  • find:function
  • upsert:function
    • The upsert inserts a lock if it doesnt exist otherwise it will be updated.

      Parameters

      • key: string

        The unique identifier for the lock.

      • lockId: string
      • expiration: null | Date

      Returns Promise<void>