Class PlatformMysqlImpl
java.lang.Object
org.apache.torque.templates.platform.PlatformDefaultImpl
org.apache.torque.templates.platform.PlatformMysqlImpl
- All Implemented Interfaces:
Platform
MySql Platform implementation.
- Version:
- $Id: PlatformMysqlImpl.java 1917240 2024-04-21 13:22:54Z tv $
- Author:
- Martin Poeschl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns whether backslashes must be escaped in string literals.getDateString(Date date) Formats the given date as date string which is parseable by the database.getTimestampString(Date date) Formats the given date as timestamp string which is parseable by the database.booleanprecison in time formats is more like a scale, which is the number of digits to the right of the decimal point in a number.booleanReturns if the RDBMS-specific SQL type has a size attribute.booleanReturns whether the database has schema support unique constraint for columns with sizeMethods inherited from class org.apache.torque.templates.platform.PlatformDefaultImpl
createNotNullBeforeAutoincrement, formatDateTimeString, getNullString, getSizeSuffix, getSqlTypeForSchemaType, getTimeString, quoteAndEscape, setSchemaTypeToSqlTypeMapping, usesStandaloneSchema
-
Constructor Details
-
PlatformMysqlImpl
public PlatformMysqlImpl()Default constructor.
-
-
Method Details
-
getAutoIncrement
- Specified by:
getAutoIncrementin interfacePlatform- Overrides:
getAutoIncrementin classPlatformDefaultImpl- Returns:
- The RDBMS-specific SQL fragment for autoincrement.
- See Also:
-
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:
-
hasScale
precison in time formats is more like a scale, which is the number of digits to the right of the decimal point in a number.- Specified by:
hasScalein interfacePlatform- Overrides:
hasScalein classPlatformDefaultImpl- Parameters:
sqlType- the SQL type- Returns:
- true if the type has a scale attribute
- 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.
-
getDateString
Formats the given date as date string which is parseable by the database.- Specified by:
getDateStringin interfacePlatform- Overrides:
getDateStringin classPlatformDefaultImpl- Parameters:
date- the date to format.- Returns:
- the date string, inclusive string escaping.
-
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.
-
hasUniqueConstraintSize
public boolean hasUniqueConstraintSize()Returns whether the database has schema support unique constraint for columns with size- Specified by:
hasUniqueConstraintSizein interfacePlatform- Overrides:
hasUniqueConstraintSizein classPlatformDefaultImpl- Returns:
- true if unique column constraint has size
-