Class PlatformMssqlImpl
- java.lang.Object
-
- org.apache.torque.templates.platform.PlatformDefaultImpl
-
- org.apache.torque.templates.platform.PlatformMssqlImpl
-
- All Implemented Interfaces:
Platform
public class PlatformMssqlImpl extends PlatformDefaultImpl
MS SQL Platform implementation.- Version:
- $Id: PlatformMssqlImpl.java 1872379 2020-01-06 13:45:27Z tv $
- Author:
- Martin Poeschl, Greg Monroe
-
-
Constructor Summary
Constructors Constructor Description PlatformMssqlImpl()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanescapeBackslashes()Returns whether backslashes must be escaped in string literals.StringgetNullString(boolean notNull)StringgetTimestampString(Date date)Formats the given date as timestamp string which is parseable by the database.booleanhasSize(String sqlType)Returns if the RDBMS-specific SQL type has a size attribute.booleanusesStandaloneSchema()Returns whether the database has schema support where a schema is not tied to a user (oracle) or database (mysql), but can be created separately.-
Methods inherited from class org.apache.torque.templates.platform.PlatformDefaultImpl
createNotNullBeforeAutoincrement, formatDateTimeString, getAutoIncrement, getDateString, getSizeSuffix, getSqlTypeForSchemaType, getTimeString, hasScale, hasUniqueConstraintSize, quoteAndEscape, setSchemaTypeToSqlTypeMapping
-
-
-
-
Method Detail
-
getNullString
public String getNullString(boolean notNull)
- Specified by:
getNullStringin interfacePlatform- Overrides:
getNullStringin classPlatformDefaultImpl- Parameters:
notNull- flag for not null- Returns:
- Explicitly returns
NULLif null values are allowed (as recomended by Microsoft). - See Also:
Platform.getNullString(boolean)
-
escapeBackslashes
protected boolean escapeBackslashes()
Description copied from class:PlatformDefaultImplReturns whether backslashes must be escaped in string literals.- Overrides:
escapeBackslashesin classPlatformDefaultImpl- Returns:
- true if backslashes bust be escaped, false otherwise.
-
getTimestampString
public String getTimestampString(Date date)
Formats the given date as timestamp string which is parseable by the database.- Specified by:
getTimestampStringin interfacePlatform- Overrides:
getTimestampStringin classPlatformDefaultImpl- Parameters:
date- the date to format.- Returns:
- the timestamp string, inclusive string escaping.
-
usesStandaloneSchema
public boolean usesStandaloneSchema()
Returns whether the database has schema support where a schema is not tied to a user (oracle) or database (mysql), but can be created separately.- Specified by:
usesStandaloneSchemain interfacePlatform- Overrides:
usesStandaloneSchemain classPlatformDefaultImpl- Returns:
- this implementation returns true.
-
hasSize
public boolean hasSize(String sqlType)
Description copied from interface:PlatformReturns if the RDBMS-specific SQL type has a size attribute.- Specified by:
hasSizein interfacePlatform- Overrides:
hasSizein classPlatformDefaultImpl- Parameters:
sqlType- the SQL type- Returns:
- true if the type has a size attribute
- See Also:
Platform.hasSize(String)
-
-