Class SqlUtil

java.lang.Object
liquibase.util.SqlUtil

public abstract class SqlUtil extends Object
  • Field Details

    • NAME_PATTERN

      public static final Pattern NAME_PATTERN
  • Constructor Details

    • SqlUtil

      public SqlUtil()
  • Method Details

    • isNumeric

      public static boolean isNumeric(int dataType)
    • isBoolean

      public static boolean isBoolean(int dataType)
    • isDate

      public static boolean isDate(int dataType)
    • parseValue

      public static Object parseValue(Database database, Object val, DataType type)
    • replacePredicatePlaceholders

      public static String replacePredicatePlaceholders(Database database, String predicate, List<String> columnNames, List<Object> parameters)
    • getSqlString

      public static String getSqlString(SqlStatement statement, SqlGeneratorFactory sqlGeneratorFactory, Database database)
      Get the string sql statements from a given SqlStatement
      Parameters:
      statement - the statement to stringify
      sqlGeneratorFactory - the SqlGeneratorFactory instance to use to generate the sql
      database - the database to generate sql against
      Returns:
      the sql string or an empty string if there are no statements to generate
    • convertSqlArrayToString

      public static String convertSqlArrayToString(Sql[] sqlStatements)
      Given an array of sql, get the string sql statements.
      Parameters:
      sqlStatements - the statements to stringify
      Returns:
      the sql string or an empty string if there are no statements to generate