insert method

Future<void> insert(
  1. JsonMap document, {
  2. bool optimistic = false,
})

Inserts a new document into the collection.

Use optimistic to apply the change locally before server confirmation.

Implementation

Future<void> insert(JsonMap document, {bool optimistic = false}) {
  return _client.insert(_name, document, optimistic: optimistic);
}