java.lang.Object
org.tentackle.sql.NonStandardCommons
Holds non-SQL-standard common features supported by most backends.
- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringsqlCreateCommentOnColumn(Backend backend, String tableName, String columnName, String comment) Creates a COMMENT ON COLUMN statement.static StringsqlCreateCommentOnSequence(Backend backend, String sequenceName, String comment) Creates a COMMENT ON SEQUENCE statement.static StringsqlCreateCommentOnTable(Backend backend, String tableName, String comment) Creates a COMMENT ON TABLE statement.static StringsqlCreateSequence(String name, Long start, Long increment) Creates the SQL string to create a sequence.
-
Method Details
-
sqlCreateCommentOnTable
Creates a COMMENT ON TABLE statement.- Parameters:
backend- the backendtableName- the table name with optional schema separated by a dotcomment- optional comment, null if none- Returns:
- the SQL code including the closing semicolon and newline
-
sqlCreateCommentOnColumn
public static String sqlCreateCommentOnColumn(Backend backend, String tableName, String columnName, String comment) Creates a COMMENT ON COLUMN statement.- Parameters:
backend- the backendtableName- the table name with optional schema separated by a dotcolumnName- the column namecomment- optional comment, null if none- Returns:
- the SQL code including the closing semicolon and newline
-
sqlCreateSequence
Creates the SQL string to create a sequence.- Parameters:
name- the sequence namestart- the optional start value, defaults to 1increment- the optional increment, defaults to 1- Returns:
- the SQL code
-
sqlCreateCommentOnSequence
public static String sqlCreateCommentOnSequence(Backend backend, String sequenceName, String comment) Creates a COMMENT ON SEQUENCE statement.- Parameters:
backend- the backendsequenceName- the name with optional schema separated by a dotcomment- optional comment, null if none- Returns:
- the SQL code including the closing semicolon and newline
-