Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

ArangoDB: AQL: Insert multiple documents

Syntax

FOR doc IN array_of_documents
INSERT doc INTO colleciton_name

 

Example

let users_info = [
{"id": 2, "firstName" : "Sowmya", "lastName" : "Gurram"},
{"id" : 3, "firstName" : "Madhu", "lastName" : "Thatha"}
]

for doc in users_info
INSERT doc INTO users

 

You can execute below snippet to get all the documents from a collection.

 

Syntax

FOR item in collection
RETURN item

Example

FOR userDoc IN users
RETURN userDoc


 

 

 

 

 

Previous                                                    Next                                                    Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

ArangoDB: AQL: Insert multiple documents

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×