code: private static String buildConnectionString(final String connectionString,
                                                 final Config config) {
  
        if(config == null) {
           return connectionString;
        }
  
        StringBuilder buf = new StringBuilder();
        Iterator<Map.Entry<String, ConfigValue>> iter = config.entrySet().iterator();
        if(iter.hasNext()) {
           Map.Entry<String, ConfigValue> curr = iter.next();
           buf.append(curr.getKey()).append("=").append(curr.getValue().unwrapped().toString());
        } else {
           return connectionString;
        }
  
        while(iter.hasNext()) {
           Map.Entry<String, ConfigValue> curr = iter.next();
           buf.append("&").append(curr.getKey()).append("=").append(curr.getValue().unwrapped().toString());
        }
  
        if(connectionString.indexOf('?') > 0) {
           return connectionString + "&" + buf.toString();
        } else {
           return connectionString + "?" + buf.toString();
        }
     }
docs: Builds a connection string with properties as parameters.
  @param connectionString The connection string.
  @return The connection string with properties as parameters.