Skip to main content
Version: 5.7.0

GetListCountWithHint

Get a count of entities from the server base on where clause and hinting on index hint. Where clause allows entityType, createdAt, updatedAt, data items.

ServiceOperation
globalEntityGET_LIST_COUNT_WITH_HINT

Method Parameters

ParameterDescription
whereA mongo style query string.
hintJsonThe field index keys to be hinted, as JSON object.

Usage

http://localhost:3000
string where = "{\"data.team\": \"Red\", \"data.position\": \"Forward\"}";
string hintJson = "{\"data.team\": 1, \"data.position\": 1}";

SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.GlobalentityService.GetListCountWithHint(where, hintJson, successCallback, failureCallback);
JSON Response
{
"status":200,
"data":
{
"entityListCount":5
}
}