fetchCount method

Future<DfResponse> fetchCount(
  1. DfQuery query
)

Implementation

Future<DfResponse> fetchCount(DfQuery query) async {
  DfResponse resp = DfResponse();
  DfResponse resultSet = await(fetch(query));
  resp.error = resultSet.error;
  resp.fetchCountData = 0;
  if (resultSet.result != null) {
    resultSet.result.forEach((rec) {
      rec.forEach((key,val) {
        resp.fetchCountData = val;
      });
    }
    );
  }
  return resp;
}