code: final DataSet executeQuery(CallInfo callInfo, boolean takeSnapshot) {
      DataSet data = new DataSet(this);
      return db.access(callInfo, () -> {
        try (WrappedStatement ws = db.compile(getSQLForQuery())) {
          proceedWithQuery(ws.getStatement(), data);
          if (takeSnapshot) {
            setSnapshot(data);
            db.logSnapshot(callInfo, data);
          } else {
            db.logQuery(callInfo, data);
          }
        }
        return data;
      });
    }
docs: Execute query.
  @param callInfo Call info.
  @param takeSnapshot Indicates that a snapshot should be taken.
  @return Result of query.