createDocument method

  1. @override
TDocument createDocument(
  1. TCollection collection, [
  2. String? id
])
override

Performs the process of loading a collection.

Usually, you specify a method that can be executed only the first time, such as loadOnce or listen. Retrieves a document from a collection.

By specifying id, you can specify the ID of newly created document. If not specified, uuid will be used.

Implementation

@override
TDocument createDocument(
  TCollection collection, [
  String? id,
]) =>
    adapter.createDocument(collection, id);