Insert AQL
insert doc query
INSERT { name: "AQL" } into sample RETURN NEW
expected return value
[
{
"_key": "717255",
"_id": "sample/717255",
"_rev": "_edC9216---",
"name": "AQL"
}
]
insert doc query user specified key
INSERT { _key: "Test" , name: "AQL" } into sample RETURN NEW
(try to run this insert 2 times)
expected return value
[
{
"_key": "Test",
"_id": "sample/Test",
"_rev": "_edC58Ru---",
"name": "AQL"
}
]
explanation:
Insert the object definend in {} into COLLECTION and return the NEW created Object:
- _key is unique in collection == {NodeID}
- _id is unique in database == {CollectionID}/{NodeID}
- _rev which revision of this object