类 MergedSqlConfig
java.lang.Object
cn.taketoday.test.context.jdbc.MergedSqlConfig
MergedSqlConfig encapsulates the merged @SqlConfig
attributes declared locally via Sql.config() and globally as a class-level annotation.
Explicit local configuration attributes override global configuration attributes.
- 从以下版本开始:
- 4.0
- 作者:
- Sam Brannen
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明MergedSqlConfig(SqlConfig localSqlConfig, Class<?> testClass) Construct aMergedSqlConfiginstance by merging the configuration from the supplied local (potentially method-level)@SqlConfigannotation with class-level configuration discovered on the suppliedtestClass. -
方法概要
修饰符和类型方法说明private static voidenforceCommentPrefixAliases(cn.taketoday.core.annotation.AnnotationAttributes attributes) (专用程序包) StringGet the end delimiter that identifies block comments within the SQL scripts.(专用程序包) StringGet the start delimiter that identifies block comments within the SQL scripts.(专用程序包) String[]Get the prefixes that identify single-line comments within the SQL scripts.private static String[]getCommentPrefixes(cn.taketoday.core.annotation.AnnotationAttributes attributes) (专用程序包) StringGet the bean name of theDataSource.(专用程序包) StringGet the encoding for the SQL scripts, if different from the platform encoding.private static <E extends Enum<?>>
EgetEnum(cn.taketoday.core.annotation.AnnotationAttributes attributes, String attributeName, E inheritedOrDefaultValue, E defaultValue) (专用程序包) SqlConfig.ErrorModeGet theSqlConfig.ErrorMode.(专用程序包) StringGet the character string used to separate individual statements within the SQL scripts.private static StringgetString(cn.taketoday.core.annotation.AnnotationAttributes attributes, String attributeName, String defaultValue) (专用程序包) StringGet the bean name of thePlatformTransactionManager.(专用程序包) SqlConfig.TransactionModeGet theSqlConfig.TransactionMode.private static booleanisEmptyArray(Object value) private static booleanisEmptyString(Object value) private static booleanisExplicitValue(Object value) Determine if the supplied value is an explicit value (i.e., not a default).private cn.taketoday.core.annotation.AnnotationAttributesmergeAttributes(SqlConfig localSqlConfig, Class<?> testClass) toString()Provide a String representation of the merged SQL script configuration.
-
字段详细资料
-
构造器详细资料
-
MergedSqlConfig
Construct aMergedSqlConfiginstance by merging the configuration from the supplied local (potentially method-level)@SqlConfigannotation with class-level configuration discovered on the suppliedtestClass.Local configuration overrides class-level configuration.
If the test class is not annotated with
@SqlConfig, no merging takes place and the local configuration is used "as is".
-
-
方法详细资料
-
mergeAttributes
-
getDataSource
String getDataSource()Get the bean name of theDataSource.- 另请参阅:
-
getTransactionManager
String getTransactionManager()Get the bean name of thePlatformTransactionManager. -
getTransactionMode
SqlConfig.TransactionMode getTransactionMode()Get theSqlConfig.TransactionMode. -
getEncoding
String getEncoding()Get the encoding for the SQL scripts, if different from the platform encoding.- 另请参阅:
-
getSeparator
String getSeparator()Get the character string used to separate individual statements within the SQL scripts.- 另请参阅:
-
getCommentPrefixes
String[] getCommentPrefixes()Get the prefixes that identify single-line comments within the SQL scripts.- 从以下版本开始:
- 4.0
- 另请参阅:
-
getBlockCommentStartDelimiter
String getBlockCommentStartDelimiter()Get the start delimiter that identifies block comments within the SQL scripts. -
getBlockCommentEndDelimiter
String getBlockCommentEndDelimiter()Get the end delimiter that identifies block comments within the SQL scripts. -
getErrorMode
SqlConfig.ErrorMode getErrorMode()Get theSqlConfig.ErrorMode.- 另请参阅:
-
toString
Provide a String representation of the merged SQL script configuration. -
getEnum
-
getString
-
enforceCommentPrefixAliases
private static void enforceCommentPrefixAliases(cn.taketoday.core.annotation.AnnotationAttributes attributes) -
getCommentPrefixes
private static String[] getCommentPrefixes(cn.taketoday.core.annotation.AnnotationAttributes attributes) -
isExplicitValue
Determine if the supplied value is an explicit value (i.e., not a default). -
isEmptyString
-
isEmptyArray
-