|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SQLDialect
This class contains methods to assist you in formatting SQL queries adjusted to the target database type
| Method Summary | |
|---|---|
String |
escapeIdentifier(String identifier)
Takes the name of a database object (table, column, etc) and returns the name wrapped in characters that marks it's an identifier. |
String |
escapeString(String string)
Returns a string with all special characters replaced with their proper escape sequences. |
String |
formatDate(Date date)
Formats a java Date into the preferred date string format for this database server type, probably YYYY-MM-DD |
String |
formatDateTime(Date timestamp)
Formats a java Date into the preferred date time string format for this database server type, probably YYYY-MM-DD HH:MM:SS.ZZZ |
String |
formatTime(Date date)
Formats a java Date into the preferred time string format for this database server type, probably HH:MM:SS.ZZZ |
String |
formatValue(Object value,
int targetType)
Formats a generic object into a String that can be inserted into a dynamically constructed SQL statement. |
String[] |
getCreateTableStatement(String schemaName,
String name,
List<Column> columns,
List<Index> indexes)
|
String |
getDropTableStatement(String catalog,
String schema,
String tableName)
|
String |
getSingleLineCommentPrefix()
|
boolean |
isCompatible(int fromSqlType,
int toSqlType)
|
Object |
safeType(Column targetColumn,
Object object)
Attempts to convert a particular value to an acceptable format. |
| Method Detail |
|---|
String escapeIdentifier(String identifier)
identifier - string to wrapp
String escapeString(String string)
string - String to convert
String formatDate(Date date)
date - Date to format
String formatDateTime(Date timestamp)
date - Date to format
String formatTime(Date date)
date - Date to format
String formatValue(Object value,
int targetType)
value - Value to be formattedtargetType - java.sql.Types constant of the type you want to format
the value as
String[] getCreateTableStatement(String schemaName,
String name,
List<Column> columns,
List<Index> indexes)
String getDropTableStatement(String catalog,
String schema,
String tableName)
String getSingleLineCommentPrefix()
boolean isCompatible(int fromSqlType,
int toSqlType)
Object safeType(Column targetColumn,
Object object)
targetColumn - Column we want to insert intoobject - Object to insert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||