/** Returns the schema and authorisation statements for the database. */
  public Result getScript(boolean indexRoots) {

    Result r = Result.newSingleColumnResult("COMMAND");

    // properties
    String[] list = logger.getPropertiesSQL(indexRoots);

    addRows(r, list);

    list = getSettingsSQL();

    addRows(r, list);

    list = getGranteeManager().getSQL();

    addRows(r, list);

    // schemas and schema objects such as tables, sequences, etc.
    list = schemaManager.getSQLArray();

    addRows(r, list);

    // optional comments on tables etc.
    list = schemaManager.getCommentsArray();

    addRows(r, list);

    list = schemaManager.getTableSpaceSQL();

    addRows(r, list);

    // index roots
    if (indexRoots) {
      list = schemaManager.getIndexRootsSQL();

      addRows(r, list);
    }

    // text headers - readonly - clustered
    list = schemaManager.getTablePropsSQL(!indexRoots);

    addRows(r, list);

    // password complexity
    list = getUserManager().getAuthenticationSQL();

    addRows(r, list);

    // user session start schema names
    list = getUserManager().getInitialSchemaSQL();

    addRows(r, list);

    // grantee rights
    list = getGranteeManager().getRightstSQL();

    addRows(r, list);

    return r;
  }
  /** Returns the schema and authorisation statements for the database. */
  public Result getScript(boolean indexRoots) {

    Result r = Result.newSingleColumnResult("COMMAND", Type.SQL_VARCHAR);

    // properties
    String[] list = logger.getPropertiesSQL();

    addRows(r, list);

    list = getSettingsSQL();

    addRows(r, list);

    list = getGranteeManager().getSQL();

    addRows(r, list);

    // schemas and schema objects such as tables, sequences, etc.
    list = schemaManager.getSQLArray();

    addRows(r, list);

    // user session start schema names
    list = getUserManager().getInitialSchemaSQL();

    addRows(r, list);

    // grantee rights
    list = getGranteeManager().getRightstSQL();

    addRows(r, list);

    // index roots
    if (indexRoots) {
      list = schemaManager.getIndexRootsSQL();

      addRows(r, list);
    }

    // text headers
    list = schemaManager.getTextTableSQL(!indexRoots);

    addRows(r, list);

    return r;
  }