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

Count Documents

count Method

The method used to count the number of documents in a collection. A find criteria can be used to count with a filter.

To count all records, use an empty criteria. Ie count()or count({})

Usage

const count = await User.count({});

// Do something with count.
const count = await User.count({ age: { $gt: 12 } });

// Do something with count.

Please refer to the find methods for the operators that can be implemented in the criteria.

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