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
`SlicingDice` encapsulates logic for sending requests to the API. Its methods are thin layers around the [API endpoints](https://docs.slicingdice.com/docs/api-details), so their parameters and return values are JSON-like `Object` objects with the same syntax as the [API endpoints](https://docs.slicingdice.com/docs/api-details)
78
78
79
-
### Attributes
80
-
81
-
*`sdAddress (String)` - [Connection endpoint](https://docs.slicingdice.com/docs/api-keys) to use when generating requests to SlicingDice.
82
-
83
79
### Constructor
84
80
85
-
`SlicingDice(apiKeys, usesTestEndpoint)`
81
+
`SlicingDice(apiKeys)`
86
82
*`apiKeys (Object)` - [API key](https://docs.slicingdice.com/docs/api-keys) to authenticate requests with the SlicingDice API.
87
-
*`usesTestEndpoint (boolean)` - If false the client will send requests to production end-point, otherwise to tests end-point.
88
83
89
84
### `getDatabase()`
90
85
Get information about current database. This method corresponds to a `GET` request at `/database`.
@@ -96,7 +91,7 @@ let SlicingDice = require('slicerjs');
Verify which entities exist in a table (uses `default`table if not provided) given a list of entity IDs. This method corresponds to a [POST request at /query/exists/entity](https://docs.slicingdice.com/docs/exists).
267
+
### `existsEntity(ids, dimension = null)`
268
+
Verify which entities exist in a tabdimensionle (uses `default`dimension if not provided) given a list of entity IDs. This method corresponds to a [POST request at /query/exists/entity](https://docs.slicingdice.com/docs/exists).
274
269
275
270
#### Request example
276
271
@@ -280,7 +275,7 @@ let SlicingDice = require('slicerjs');
Count the total number of inserted entities in the given tables. This method corresponds to a [POST request at /query/count/entity/total](https://docs.slicingdice.com/docs/total#section-counting-specific-tables).
341
+
### `countEntityTotal(dimensions)`
342
+
Count the total number of inserted entities in the given dimensions. This method corresponds to a [POST request at /query/count/entity/total](https://docs.slicingdice.com/docs/total#section-counting-specific-tables).
348
343
349
344
#### Request example
350
345
@@ -354,11 +349,11 @@ let SlicingDice = require('slicerjs');
Copy file name to clipboardExpand all lines: tests_and_examples/examples/count_entity.json
+3-3
Original file line number
Diff line number
Diff line change
@@ -23283,7 +23283,7 @@
23283
23283
"name": "Test for a \"COUNT ENTITY\" query using automatically created columns, operator \"AND\" and parameter \"EQUALS\".",
23284
23284
"columns": [],
23285
23285
"insert": {
23286
-
"auto-create": ["table", "column"],
23286
+
"auto-create": ["dimension", "column"],
23287
23287
"24": {
23288
23288
"string-test-column": "value:matched_value",
23289
23289
"numeric-test-column": 1000001
@@ -23713,7 +23713,7 @@
23713
23713
"name": "Test for a \"COUNT ENTITY\" query using automatically created columns, operators \"AND\" and \"OR\" and parameter \"EQUALS\".",
23714
23714
"columns": [],
23715
23715
"insert": {
23716
-
"auto-create": ["table", "column"],
23716
+
"auto-create": ["dimension", "column"],
23717
23717
"24": {
23718
23718
"string-test-column": "value:matched_value",
23719
23719
"boolean-test-column": "true",
@@ -24251,7 +24251,7 @@
24251
24251
"name": "Test for a \"COUNT ENTITY\" query using automatically created columns, operators \"AND\" and \"OR\" and parameters \"EQUALS\", \"BETWEEN\" and \"MINFREQ\".",
0 commit comments