Class MySqlUrlParser
java.lang.Object
com.atlassian.jira.config.database.jdbcurlparser.MySqlUrlParser
- All Implemented Interfaces:
JdbcUrlParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the JDBC URL for this DB config.Parses JDBC URL for MySql Supports Standard and Alternate URL formats Standard format: jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]][?propertyName1=propertyValue1[invalid input: '&propertyName2'=propertyValue2]...] Alternate format: jdbc:mysql://address=(key1=value)[(key2=value)]...[,address=(key3=value)[(key4=value)]...]...[/[database]][?propertyName1=propertyValue1[invalid input: '&propertyName2'=propertyValue2]...]
-
Constructor Details
-
MySqlUrlParser
public MySqlUrlParser()
-
-
Method Details
-
getUrl
Description copied from interface:JdbcUrlParserReturns the JDBC URL for this DB config.- Specified by:
getUrlin interfaceJdbcUrlParser- Parameters:
hostname- the hostnameport- the TCP/IP port numberinstance- the DB "instance"- Returns:
- the JDBC URL for this DB config.
-
parseUrl
Parses JDBC URL for MySql Supports Standard and Alternate URL formats Standard format: jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]][?propertyName1=propertyValue1[invalid input: '&propertyName2'=propertyValue2]...] Alternate format: jdbc:mysql://address=(key1=value)[(key2=value)]...[,address=(key3=value)[(key4=value)]...]...[/[database]][?propertyName1=propertyValue1[invalid input: '&propertyName2'=propertyValue2]...]- Specified by:
parseUrlin interfaceJdbcUrlParser- Parameters:
jdbcUrl- - JDBC URL in standard or alternate format- Returns:
- a
DatabaseInstancecontaining extracted hostname, port and instance name. - Throws:
ParseException
-