Sails-ArangoJs

Sails-ArangoJs

  • Docs
  • API

›CRUD API

Getting Started

  • Installation
  • Creating Models
  • Testing

CRUD API

  • let
  • create
  • createEach
  • update
  • updateOne
  • upsert
  • find
  • findOne
  • sum
  • avg
  • destroy
  • count
  • aggregate
  • sample
  • findNear
  • findWithCount

Graph & Transactions

  • Implementing transacations
  • Graph

Going Native

  • Native Methods
  • Foxx Services

Create Each

Create

The method used to insert multiple documents into a collection. The parameter passed must be an array of objects.

Usage

const created = await User.createEach([
  {
    full_name: 'Angela W.',
    email: 'angelow@gmail.com',
    password: 'xxxxx',
  },
  { full_name: 'Ben Gaitho', email: 'bengaitho@gmail.com', passeord: 'yyyyy' },
]).meta({
  fetch: true,
});

// Do something with created records.

fetch option is optional

← createupdate →
  • Create
    • Usage
Sails-ArangoJs
Docs
Getting StartedAPI Reference
Community
User ShowcaseStack OverflowTwitter
More
BlogGitHub
Cloudhub Developer Community
Copyright © 2022 Cloud Hub Limited