Package io.micronaut.data.r2dbc.config
Class DataR2dbcConfiguration
java.lang.Object
io.micronaut.data.r2dbc.config.DataR2dbcConfiguration
- All Implemented Interfaces:
io.micronaut.core.naming.Named
@EachProperty(value="r2dbc.datasources",
primary="default")
public class DataR2dbcConfiguration
extends Object
implements io.micronaut.core.naming.Named
Configuration for Schema generation.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Constructor Summary
ConstructorDescriptionDataR2dbcConfiguration
(String name, io.r2dbc.spi.ConnectionFactory connectionFactory, jakarta.inject.Provider<R2dbcOperations> r2dbcOperations) The configuration. -
Method Summary
Modifier and TypeMethodDescriptionio.r2dbc.spi.ConnectionFactory
@NonNull String
getName()
@Nullable String
boolean
void
setBatchGenerate
(boolean batchGenerate) void
setDialect
(Dialect dialect) Sets the dialect.void
setPackages
(List<String> packages) Sets the packages to include use for the purposes of schema generation.void
setSchemaGenerate
(SchemaGenerate schemaGenerate) Sets the schema generation strategy.void
setSchemaGenerateName
(@Nullable String schemaGenerateName) void
setSchemaGenerateNames
(@Nullable List<String> schemaGenerateNames)
-
Constructor Details
-
DataR2dbcConfiguration
public DataR2dbcConfiguration(@Parameter String name, @Parameter io.r2dbc.spi.ConnectionFactory connectionFactory, @Parameter jakarta.inject.Provider<R2dbcOperations> r2dbcOperations) The configuration.- Parameters:
name
- The configuration nameconnectionFactory
- The connection factoryr2dbcOperations
- The operations
-
-
Method Details
-
getR2dbcOperations
- Returns:
- The R2DBC operations.
-
getConnectionFactory
public io.r2dbc.spi.ConnectionFactory getConnectionFactory()- Returns:
- The connection factory.
-
getSchemaGenerate
- Returns:
- The schema generation strategy.
-
setSchemaGenerate
Sets the schema generation strategy.- Parameters:
schemaGenerate
- The schema generation strategy.
-
isBatchGenerate
public boolean isBatchGenerate()- Returns:
- Whether to generate tables in batch.
-
setBatchGenerate
public void setBatchGenerate(boolean batchGenerate) - Parameters:
batchGenerate
- Whether to generate tables in batch.
-
getPackages
- Returns:
- The packages to include use for the purposes of schema generation.
-
setPackages
Sets the packages to include use for the purposes of schema generation.- Parameters:
packages
- The packages
-
getDialect
- Returns:
- The dialect to use.
-
setDialect
Sets the dialect.- Parameters:
dialect
- The dialect
-
getName
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
getSchemaGenerateName
- Returns:
- The schema name that should be used for generating
-
setSchemaGenerateName
- Parameters:
schemaGenerateName
- The schema name that should be used for generating
-
getSchemaGenerateNames
- Returns:
- The schema names that should be used for generating
-
setSchemaGenerateNames
- Parameters:
schemaGenerateNames
- The schema names that should be used for generating
-