MONGO D B LINK PACKAGE SYMBOL

InsertDocument


inserts a document (list of rules) into a collection.

DetailsDetails

  • InsertDocument fully supports nested documents, arrays and primitive types (e.g. strings, numbers).
  • The following options can be given:
  • WriteConcernAcknowledgedwrite concern to use
  • Valid options for WriteConcern are "Acknowledged", "FSynced", "Journaled", "Majority", "Unacknowledged" and "ReplicaAcknowledged". For a description of these options, see the MongoDB documentation.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Open a database connection, get the database and get the collection:

In[1]:=
Click for copyable input

Insert a document:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=