mase

insert

Insert a new document. When document is not a plain object, i.e. 'one', 1, etc., it will be inserted using its value.

db.insert(1); // => {value: 1, _id: 'wZy7rd33Q8478pvi'}

spec

function insert(object|any document)

arguments

  • document type object or any, element to insert.

defaults

  • document._id to a 24 length random string

returns a clone of the inserted document