Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

fix: wrap operations in transactions #7

Closed
wants to merge 9 commits into from

Commits on Jun 10, 2020

  1. fix: wrap operations in transactions

    To get a cursor to operate over a set of keys from an idb store, you
    have to start a transaction. That transaction will remain open as long
    as there are tasks in the microtask queue - when it empties the
    transaction is automatically closed.
    
    Transactions operate on an ObjectStore, puts and gets not to the object
    store also seem to close the transaction.
    
    This change adds a `_getObjectStore` method to the datastore which
    creates a new transaction if there was no previous transation, or if
    the previous transaction was closed.  All operations then take place as
    part of this transaction.
    achingbrain committed Jun 10, 2020
    Configuration menu
    Copy the full SHA
    807e425 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c7f97b View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2020

  1. Configuration menu
    Copy the full SHA
    11c5b6c View commit details
    Browse the repository at this point in the history
  2. fix: mark transaction as active after cursor has been created

    Still not 100% on this as you could in theory cause the transaction to close
    by mutating the datastore while the cursor was being opened or advanced but
    it's a start.
    achingbrain committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    22bc4c0 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2020

  1. Configuration menu
    Copy the full SHA
    686fddc View commit details
    Browse the repository at this point in the history
  2. chore: bundle size

    achingbrain committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    f57e71a View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2020

  1. Configuration menu
    Copy the full SHA
    1250a6f View commit details
    Browse the repository at this point in the history
  2. chore: linting

    achingbrain committed Jun 15, 2020
    Configuration menu
    Copy the full SHA
    bb93b14 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2020

  1. chore: fix linting

    achingbrain committed Jun 16, 2020
    Configuration menu
    Copy the full SHA
    e2803b6 View commit details
    Browse the repository at this point in the history