@Override
   public ResultSet readTable (String tableName, String[] columns, int nThread) throws SQLException {

      // If table name parameter is null get it from options
      tableName = tableName == null ? this.options.getSourceTable() : tableName;

      // If columns parameter is null, get it from options
      String allColumns = this.options.getSourceColumns() == null ? "*" : this.options.getSourceColumns();

      long offset = nThread * chunkSize;
      String sqlCmd;

      // Read table with source-query option specified
      if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {
         sqlCmd = "SELECT  * FROM (" + options.getSourceQuery() + ") AS REPLICADB_TABLE ";
      } else {

         sqlCmd = "SELECT " + allColumns + " FROM " + escapeTableName(tableName);

         // Source Where
         if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {
            sqlCmd = sqlCmd + " WHERE " + options.getSourceWhere();
         }
      }

      if (chunkSize != 0L) {
         sqlCmd = sqlCmd + " LIMIT ? OFFSET ?";
         return super.execute(sqlCmd, chunkSize, offset);
      } else {
         return super.execute(sqlCmd);
      }
   }
Constructs the SqlManager.

@param opts the ReplicaDB ToolOptions describing the user's requested action.
src/main/java/org/replicadb/manager/MySQLManager.java