Moved Ray's safeJigger into JDBCUtil so it can be shared with the world.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1566 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
eric
2005-01-07 03:14:04 +00:00
parent 78582d3cbc
commit a6eb8ef8d7
@@ -25,6 +25,7 @@ import java.sql.*;
import com.samskivert.Log;
import com.samskivert.io.PersistenceException;
import com.samskivert.util.StringUtil;
/**
* A repository for JDBC related utility functions.
@@ -165,6 +166,15 @@ public class JDBCUtil
}
}
/**
* Utility method to jigger the specified string so that it's safe
* to use in a regular Statement.
*/
public static String safeJigger (String text)
{
return StringUtil.replace(jigger(text), "'", "\\'");
}
/**
* Returns true if the table with the specified name exists, false if
* it does not. <em>Note:</em> the table name is case sensitive.