forked from JSQLParser/JSqlParser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,650 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/main/java/net/sf/jsqlparser/util/validation/DatabaseType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package net.sf.jsqlparser.util.validation; | ||
|
||
/** | ||
* <p> | ||
* The DatabaseType is named like the identifier used within the | ||
* jdbc-connection-url, this may change in future, therefore use | ||
* {@link #get(String)} to retrieve the {@link DatabaseType}. | ||
* </p> | ||
*/ | ||
public enum DatabaseType { | ||
|
||
oracle, mysql, sqlserver; | ||
|
||
/** | ||
* @param jdbcIdentifier - the database-identifier-part of jdbc-url | ||
* @return the {@link DatabaseType} | ||
* @throws IllegalArgumentException - if the specified jdbcIdentifier cannot be mapped to a {@link DatabaseType} | ||
*/ | ||
public static DatabaseType get(String jdbcIdentifier) { | ||
return DatabaseType.valueOf(jdbcIdentifier); | ||
} | ||
|
||
} |
Oops, something went wrong.