Skip to content

Commit

Permalink
add ValidationVisitor showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmotte committed Jun 30, 2020
1 parent ea88e1b commit d069e39
Show file tree
Hide file tree
Showing 7 changed files with 1,650 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/java/net/sf/jsqlparser/util/validation/DatabaseType.java
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);
}

}
Loading

0 comments on commit d069e39

Please sign in to comment.