code: private static void append(final StringBuilder builder, final String identifier, final String quote) throws SQLException {
  		if (identifier.indexOf('\n') >= 0 || identifier.indexOf('\r') >= 0) {
  			throw new SQLException("Identifier contains line breaks: " + identifier);
  		} else if (" ".equals(quote)) {
  			for (int i = 0; i < identifier.length(); ++i) {
  				char c = identifier.charAt(i);
  				if (!Character.isLetterOrDigit(c) && c != '_' && c != '@' && c != '$' && c != '#') {
  					throw new SQLException("Illegal identifier: " + identifier);
  				}
  			}
  			builder.append(identifier);
  		} else {
  			builder.append(quote).append(identifier.replace(quote, quote + quote)).append(quote);
  		}
  	}
docs: Appends a database identifier securely to a builder that is building a SQL statement.
  
  @param builder
  String builder that is building a SQL statement
  @param identifier
  Identifier to add
  @param quote
  Character for quoting the identifier (can be a space if the database doesn't support quote characters)
  
  @throws SQLException
  Identifier contains an illegal character