add abstract method

Future<Object> add(
  1. Object value, [
  2. Object? key
])

Creates a structured clone of the value, and stores the cloned value in the object store. This is for adding new records to an object store.

Returns the key of the inserted object The add method is an insert only method. If a record already exists in the object store with the key parameter as its key, then an error ConstrainError event is fired on the returned request object. For updating existing records, you should use the ObjectStore.put method instead.

null value are no longer allowed.

Implementation

Future<Object> add(Object value, [Object? key]);