Class SqlUtil


  • public class SqlUtil
    extends Object
    Utilities for dealing with SQL strings.
    • Method Detail

      • isUpdateSql

        public static boolean isUpdateSql​(String sql)
                                   throws IllegalArgumentException
        Determines whether a sql statement is an update (INSERT, UPDATE, or DELETE). Throws exception if SQL statement appears to be invalid (because it's null, has 0 length, etc.
        Parameters:
        sql - Sql string
        Returns:
        True if INSERT, UPDATE, or DELETE, and false otherwise
        Throws:
        IllegalArgumentException - If sql string is invalid and neither a query or an update
      • getKeyword

        public static String getKeyword​(String sql)
      • createFeatureNotSupportedException

        public static SQLException createFeatureNotSupportedException()