public class ConstraintParser extends Object
| Constructor and Description |
|---|
ConstraintParser() |
| Modifier and Type | Method and Description |
|---|---|
static Constraint |
getColumnConstraint(String constraintSql)
Attempt to get a column constraint by parsing the SQL statement
|
static ColumnConstraints |
getColumnConstraints(String constraintSql)
Attempt to get column constraints by parsing the SQL statement
|
static ConstraintType |
getColumnType(String constraintSql)
Get the column constraint type of the constraint SQL
|
static Constraint |
getConstraint(String constraintSql)
Attempt to get a constraint by parsing the SQL statement
|
static TableConstraints |
getConstraints(String tableSql)
Get the constraints for the table SQL
|
static String |
getName(String constraintSql)
Get the constraint name if it has one
|
static String[] |
getNameAndDefinition(String constraintSql)
Get the constraint name and remaining definition
|
static Constraint |
getTableConstraint(String constraintSql)
Attempt to get a table constraint by parsing the SQL statement
|
static ConstraintType |
getTableType(String constraintSql)
Get the table constraint type of the constraint SQL
|
static ConstraintType |
getType(String constraintSql)
Get the constraint type of the constraint SQL
|
static boolean |
isColumnConstraint(String constraintSql)
Check if the SQL is a column type constraint
|
static boolean |
isColumnType(ConstraintType type,
String constraintSql)
Determine if the column constraint SQL is the constraint type
|
static boolean |
isConstraint(String constraintSql)
Check if the SQL is a constraint
|
static boolean |
isTableConstraint(String constraintSql)
Check if the SQL is a table type constraint
|
static boolean |
isTableType(ConstraintType type,
String constraintSql)
Determine if the table constraint SQL is the constraint type
|
static boolean |
isType(ConstraintType type,
String constraintSql)
Determine if the constraint SQL is the constraint type
|
public static TableConstraints getConstraints(String tableSql)
tableSql - table SQLpublic static ColumnConstraints getColumnConstraints(String constraintSql)
constraintSql - constraint SQL statementpublic static Constraint getTableConstraint(String constraintSql)
constraintSql - constraint SQL statementpublic static boolean isTableConstraint(String constraintSql)
constraintSql - constraint SQL statementpublic static ConstraintType getTableType(String constraintSql)
constraintSql - constraint SQLpublic static boolean isTableType(ConstraintType type, String constraintSql)
type - constraint typeconstraintSql - constraint SQLpublic static Constraint getColumnConstraint(String constraintSql)
constraintSql - constraint SQL statementpublic static boolean isColumnConstraint(String constraintSql)
constraintSql - constraint SQL statementpublic static ConstraintType getColumnType(String constraintSql)
constraintSql - constraint SQLpublic static boolean isColumnType(ConstraintType type, String constraintSql)
type - constraint typeconstraintSql - constraint SQLpublic static Constraint getConstraint(String constraintSql)
constraintSql - constraint SQL statementpublic static boolean isConstraint(String constraintSql)
constraintSql - constraint SQL statementpublic static ConstraintType getType(String constraintSql)
constraintSql - constraint SQLpublic static boolean isType(ConstraintType type, String constraintSql)
type - constraint typeconstraintSql - constraint SQLpublic static String getName(String constraintSql)
constraintSql - constraint SQLCopyright © 2020 National Geospatial-Intelligence Agency. All rights reserved.