Class PlatformMssqlImpl
java.lang.Object
org.apache.torque.templates.platform.PlatformDefaultImpl
org.apache.torque.templates.platform.PlatformMssqlImpl
- All Implemented Interfaces:
Platform
MS SQL Platform implementation.
- Version:
- $Id: PlatformMssqlImpl.java 1917240 2024-04-21 13:22:54Z tv $
- Author:
- Martin Poeschl, Greg Monroe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns whether backslashes must be escaped in string literals.getNullString(boolean notNull) getTimestampString(Date date) Formats the given date as timestamp string which is parseable by the database.booleanReturns if the RDBMS-specific SQL type has a size attribute.booleanReturns 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
-
Constructor Details
-
PlatformMssqlImpl
public PlatformMssqlImpl()Default constructor.
-
-
Method Details
-
getNullString
- 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:
-
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
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
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:
-