Spec-Zone.ru › Dart 2

dart:indexed_db

Метод openCursor

Поток<CursorWithValue> openCursor(
  1. {dynamic ключ,
  2. Диапазон ключей? range,
  3. Строка? направление,
  4. Булево? autoAdvance}
)

Создает поток курсоров по записям в этом объектом хранилище.

См. также:

  • ObjectStore.openCursor

Реализация

Stream<CursorWithValue> openCursor(
    {key, KeyRange? range, String? direction, bool? autoAdvance}) {
  var key_OR_range = null;
  if (key != null) {
    if (range != null) {
      throw new ArgumentError('Cannot specify both key and range.');
    }
    key_OR_range = key;
  } else {
    key_OR_range = range;
  }
  var request;
  if (direction == null) {
    // FIXME: Passing in "next" should be unnecessary.
    request = _openCursor(key_OR_range, "next");
  } else {
    request = _openCursor(key_OR_range, direction);
  }
  return ObjectStore._cursorStreamFromResult(request, autoAdvance);
}

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-indexed_db/Index/openCursor.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API