com.mockrunner.jdbc
Class SQLUtil

java.lang.Object
  extended by com.mockrunner.jdbc.SQLUtil

public class SQLUtil
extends java.lang.Object

Simple util class for SQL statements


Constructor Summary
SQLUtil()
           
 
Method Summary
static void checkFetchDirection(int fetchDirection)
          Throws an SQLException if the specified fetchDirection is invalid
static boolean isSelect(java.lang.String sql)
          Returns if the specified SQL string is a select, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLUtil

public SQLUtil()
Method Detail

isSelect

public static boolean isSelect(java.lang.String sql)
Returns if the specified SQL string is a select, i.e. contains the string select (case insensitive).

Parameters:
sql - the SQL string
Returns:
true if the specified SQL string is a select

checkFetchDirection

public static void checkFetchDirection(int fetchDirection)
                                throws java.sql.SQLException
Throws an SQLException if the specified fetchDirection is invalid

Parameters:
fetchDirection - the fetch direction
Throws:
java.sql.SQLException