bsonMessage.put("Shard", sessionParams.getShard());
return bsonMessage;
}
protected BSONObject create(QueryList queryList) {
BSONObject bsonQueryList = new BasicBSONObject();
bsonQueryList.put("TransactionId", queryList.getSession().getTransactionId());
bsonQueryList.put("SessionId", queryList.getSession().getSessionId());
BasicBSONList bsonQueries = new BasicBSONList();
for (int i = 0; i < queryList.getQueriesCount(); i++) {
BoundQuery boundQuery = queryList.getQueries(i);
BSONObject bsonQuery = new BasicBSONObject();
bsonQuery.put("BindVariables", bindVariablesToMap(boundQuery.getBindVariablesList()));
bsonQuery.put("Sql", boundQuery.getSql().toStringUtf8());
bsonQueries.put(i, bsonQuery);
}
bsonQueryList.put("Queries", bsonQueries);
return bsonQueryList;