insert method

Future<Document> insert (
  1. {Map<String, Object> data,
  2. Reach reach}
)

Inserts a new value.

Implementation

Future<Document> insert({
  Map<String, Object> data,
  Reach reach,
}) async {
  Document result;
  await DocumentInsertRequest(
    collection: this,
    document: null,
    data: data,
    reach: reach,
    onDocument: (v) {
      result = v;
    },
  ).delegateTo(database.adapter);
  return result;
}