W3cubDocs

/Dart 2

transactionStore method

Transaction transactionStore (String storeName, String mode)

Implementation

Transaction transactionStore(String storeName, String mode) {
  if (mode != 'readonly' && mode != 'readwrite') {
    throw new ArgumentError(mode);
  }
  // Try and create a transaction with a string mode.  Browsers that expect a
  // numeric mode tend to convert the string into a number.  This fails
  // silently, resulting in zero ('readonly').
  return _transaction(storeName, mode);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-indexed_db/Database/transactionStore.html