transaction method

Transaction transaction(storeName_OR_storeNames, String mode)

Source

Transaction transaction(storeName_OR_storeNames, String mode) {
  if (mode != 'readonly' && mode != 'readwrite') {
    throw new ArgumentError("Invalid transaction mode $mode");
  }
  var names;
  if (storeName_OR_storeNames == null) {
    throw new ArgumentError("stores may not be null in transaction");
  } else if (storeName_OR_storeNames is String ||
      storeName_OR_storeNames is DomStringList) {
    names = storeName_OR_storeNames;
  } else if (storeName_OR_storeNames is List<String>) {
    names = convertDartToNative_List(storeName_OR_storeNames);
  } else {
    throw new ArgumentError("Invalid store(s) $store_Name_OR_storeNames");
  }

  return _blink.BlinkIDBDatabase.instance
      .transaction_Callback_2_(this, names, mode);
}

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