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

Finding documents and count property

findWithCount Method

The method used to get a documents in a collection given a criteria. the result is an object with properties documents and count

The criteria must be an object. This method is ideal for pagination. Refer to the find method for criteria usage.

Usage

const docs = await Member.findWithCount({
  County: "Nairobi",
});

// {documents: [...], count: 500}

// Do something with record;
← findNearImplementing transacations →
  • findWithCount Method
    • Usage
Sails-ArangoJs
Docs
Getting StartedAPI Reference
Community
User ShowcaseStack OverflowTwitter
More
BlogGitHub
Cloudhub Developer Community
Copyright © 2022 Cloud Hub Limited