.addRejectCheck(new RejectAttributeChecker.SimpleRejectAttributeChecker(new ModelNode(DatabaseType.MARIA_DB.name())), Attribute.DIALECT.getDefinition());
private static void configureDbMeta(StoreProperties props, JdbcStringBasedStoreConfigurationBuilder builder) { props.required(DIALECT); DatabaseType type = DatabaseType.valueOf(props.get(DIALECT).toUpperCase()); builder.dialect(type); String prop; if ((prop = props.get(DB, MAJOR_VERSION)) != null) { builder.dbMajorVersion(new Integer(prop)); } if ((prop = props.get(DB, MINOR_VERSION)) != null) { builder.dbMinorVersion(new Integer(prop)); } String disableUpsert = props.get(DB, DISABLE_UPSERT); boolean upsert = Boolean.parseBoolean(disableUpsert); if (upsert) builder.addProperty(TableManagerFactory.UPSERT_DISABLED, disableUpsert); String disableIndexing = props.get(DB, DISABLE_INDEXING); boolean indexing = Boolean.parseBoolean(disableIndexing); if (indexing) builder.addProperty(TableManagerFactory.INDEXING_DISABLED, disableIndexing); }
throw new CacheConfigurationException("Unable to detect database dialect from JDBC driver name or connection metadata. Please provide this manually using the 'dialect' property in your configuration. Supported database dialect strings are " + Arrays.toString(DatabaseType.values())); LOG.debugf("Guessing database dialect as '%s'. If this is incorrect, please specify the correct dialect using the 'dialect' attribute in your configuration. Supported database dialect strings are %s", databaseType, Arrays.toString(DatabaseType.values())); return new DbMetaData(databaseType, majorVersion, minorVersion, disableUpsert, disableIndexing, disableSegmented);
} else if (storeKey.equals(ModelKeys.STRING_KEYED_JDBC_STORE)) { ModelNode dialectNode = BaseJDBCStoreConfigurationResource.DIALECT.resolveModelAttribute(context, store); DatabaseType databaseType = dialectNode.isDefined() ? DatabaseType.valueOf(dialectNode.asString()) : null;
break; case DIALECT: builder.dialect(DatabaseType.valueOf(value)); break; case DB_MAJOR_VERSION:
.addRejectCheck(new RejectAttributeChecker.SimpleRejectAttributeChecker(new ModelNode(DatabaseType.MARIA_DB.name())), Attribute.DIALECT.getDefinition());