|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clazzes.jdbc2xml.helper.SQLHelper
public abstract class SQLHelper
Helper functions common for many SQL engines.
| Constructor Summary | |
|---|---|
SQLHelper()
|
|
| Method Summary | |
|---|---|
static void |
appendTypePrec(java.lang.StringBuffer sb,
java.lang.String type,
java.lang.Integer prec)
Append an SQL type name together with a precision to a string buffer. |
static void |
appendTypePrecScale(java.lang.StringBuffer sb,
java.lang.String type,
java.lang.Integer prec,
java.lang.Integer scale)
Append an SQL type name together with a precision and a scale to a string buffer. |
static void |
copyResultField(java.sql.PreparedStatement ps,
int pc,
java.sql.ResultSet rs,
int rc)
Copies a column from a result set to a placeholder of a PreparedStatment. |
static void |
executeUpdate(java.sql.Connection connection,
java.lang.String sql)
Perform an SQL update statement. |
static void |
quoteISOSqlString(java.lang.StringBuffer sb,
java.lang.String s)
Quote the given string as defined by ISO SQL by doubling single quotes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLHelper()
| Method Detail |
|---|
public static void quoteISOSqlString(java.lang.StringBuffer sb,
java.lang.String s)
sb - The buffer to put the result to.s - The String to quote.
public static void appendTypePrec(java.lang.StringBuffer sb,
java.lang.String type,
java.lang.Integer prec)
sb - The buffer to put the result to.type - The SQL name of the type.prec - The optional precision (field width).
public static void appendTypePrecScale(java.lang.StringBuffer sb,
java.lang.String type,
java.lang.Integer prec,
java.lang.Integer scale)
sb - The buffer to put the result to.type - The SQL name of the type.prec - The optional precision (field width).scale - The optional scale (fractional digits).
public static void executeUpdate(java.sql.Connection connection,
java.lang.String sql)
throws java.sql.SQLException
connection - The JDBC connection to use.sql - The SQL update statement.
java.sql.SQLException - Upon database errorsStatement.executeUpdate(String)
public static void copyResultField(java.sql.PreparedStatement ps,
int pc,
java.sql.ResultSet rs,
int rc)
throws java.sql.SQLException
ps - The prepared statement.pc - The column number of the column to be filled.rs - The result set from which to retrieve the data.rc - The column of the result set to be evaluated.
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||