类 MergedSqlConfig

java.lang.Object
cn.taketoday.test.context.jdbc.MergedSqlConfig

class MergedSqlConfig extends Object
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
另请参阅:
  • 字段详细资料

    • COMMENT_PREFIX

      private static final String COMMENT_PREFIX
      另请参阅:
    • COMMENT_PREFIXES

      private static final String COMMENT_PREFIXES
      另请参阅:
    • dataSource

      private final String dataSource
    • transactionManager

      private final String transactionManager
    • transactionMode

      private final SqlConfig.TransactionMode transactionMode
    • encoding

      private final String encoding
    • separator

      private final String separator
    • commentPrefixes

      private final String[] commentPrefixes
    • blockCommentStartDelimiter

      private final String blockCommentStartDelimiter
    • blockCommentEndDelimiter

      private final String blockCommentEndDelimiter
    • errorMode

      private final SqlConfig.ErrorMode errorMode
  • 构造器详细资料

    • MergedSqlConfig

      MergedSqlConfig(SqlConfig localSqlConfig, Class<?> testClass)
      Construct a MergedSqlConfig instance by merging the configuration from the supplied local (potentially method-level) @SqlConfig annotation with class-level configuration discovered on the supplied testClass.

      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

      private cn.taketoday.core.annotation.AnnotationAttributes mergeAttributes(SqlConfig localSqlConfig, Class<?> testClass)
    • getDataSource

      String getDataSource()
      Get the bean name of the DataSource.
      另请参阅:
    • getTransactionManager

      String getTransactionManager()
      Get the bean name of the PlatformTransactionManager.
      另请参阅:
    • getTransactionMode

      SqlConfig.TransactionMode getTransactionMode()
      另请参阅:
    • 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()
      另请参阅:
    • toString

      public String toString()
      Provide a String representation of the merged SQL script configuration.
      覆盖:
      toString 在类中 Object
    • getEnum

      private static <E extends Enum<?>> E getEnum(cn.taketoday.core.annotation.AnnotationAttributes attributes, String attributeName, E inheritedOrDefaultValue, E defaultValue)
    • getString

      private static String getString(cn.taketoday.core.annotation.AnnotationAttributes attributes, String attributeName, String defaultValue)
    • enforceCommentPrefixAliases

      private static void enforceCommentPrefixAliases(cn.taketoday.core.annotation.AnnotationAttributes attributes)
    • getCommentPrefixes

      private static String[] getCommentPrefixes(cn.taketoday.core.annotation.AnnotationAttributes attributes)
    • isExplicitValue

      private static boolean isExplicitValue(@Nullable Object value)
      Determine if the supplied value is an explicit value (i.e., not a default).
    • isEmptyString

      private static boolean isEmptyString(@Nullable Object value)
    • isEmptyArray

      private static boolean isEmptyArray(@Nullable Object value)