Package org.javalite.db_migrator
Class DbUtils
java.lang.Object
org.javalite.db_migrator.DbUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic voidcloseQuietly(Object toClose)static DatabaseTypedatabaseType(String url)static StringdriverClass(String url)Given a jdbc url, this tries to determine the target database and returns the driver class name as a string.static intstatic StringextractDatabaseName(String url)Given a JDBC connection URL, extract only the database name.static StringextractServerUrl(String url)Given a JDBC connection URL, generate a new connection URL to connect directly to the database server itself (ie: no database specified).
-
Method Details
-
driverClass
Given a jdbc url, this tries to determine the target database and returns the driver class name as a string.- Parameters:
url- jdbc url- Returns:
- jdbc driver class name
-
databaseType
-
extractDatabaseName
Given a JDBC connection URL, extract only the database name.- Parameters:
url- a JDBC connection URL- Returns:
- the database name
-
extractServerUrl
Given a JDBC connection URL, generate a new connection URL to connect directly to the database server itself (ie: no database specified).- Parameters:
url- a JDBC connection URL- Returns:
- a new JDBC connection URL to connect directly to the database server
-
exec
-
closeQuietly
-
blank
-