You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Count the number of inserted entities. This method corresponds to a [GET request at /query/count/entity/total](http://panel.slicingdice.com/docs/#api-details-api-endpoints-get-query-count-entity-total).
311
+
Count the number of inserted entities in the whole database. This method corresponds to a [POST request at /query/count/entity/total](http://panel.slicingdice.com/docs/#api-details-api-endpoints-get-query-count-entity-total).
Count the total number of inserted entities in the given tables. This method corresponds to a [POST request at /query/count/entity/total](http://panel.slicingdice.com/docs/#api-details-api-endpoints-get-query-count-entity-total).
344
+
345
+
#### Request example
346
+
347
+
```javascript
348
+
let SlicingDice =require('slicerjs');
349
+
350
+
constclient=newSlicingDice({
351
+
masterKey:'MASTER_KEY',
352
+
readKey:'READ_KEY'
353
+
}, usesTestEndpoint =true);
354
+
355
+
consttables= ["default"];
356
+
357
+
client.countEntityTotal(tables).then((resp) => {
358
+
console.log(resp);
359
+
}, (err) => {
360
+
console.error(err);
361
+
});
362
+
```
363
+
364
+
#### Output example
365
+
366
+
```json
367
+
{
368
+
"status": "success",
369
+
"result": {
370
+
"total": 42
371
+
},
372
+
"took": 0.103
373
+
}
374
+
```
375
+
342
376
### `countEntity(jsonData)`
343
377
Count the number of entities matching the given query. This method corresponds to a [POST request at /query/count/entity](http://panel.slicingdice.com/docs/#api-details-api-endpoints-post-query-count-entity).
0 commit comments