toMap method

Map<String, dynamic> toMap()

Returns created query object as Map structure, which contains keys: 'query' and 'bindVars'. The 'query' key value contains a query text, queryString() method result. The 'bindVars' key value contains a structure with binded variables, bindedVars getter result.

Implementation

Map<String,dynamic> toMap() {
  //соберем bindVars в один Map:
  for (var bv in bindVars!) {
    bindVarsMap.addAll(bv.bindNameValuePair);
  }

  var result = {
    'query': queryString(),
    'bindVars': bindedVars,
  };

  return result;
}