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 java.lang.Object implements io.micronaut.core.naming.Named
Configuration for Schema generation.- Since:
- 1.0.0
- Author:
- graemerocher
-
-
Constructor Summary
Constructors Constructor Description DataR2dbcConfiguration(java.lang.String name, io.r2dbc.spi.ConnectionFactory connectionFactory, R2dbcOperations r2dbcOperations)
The configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.r2dbc.spi.ConnectionFactory
getConnectionFactory()
Dialect
getDialect()
java.lang.String
getName()
java.util.List<java.lang.String>
getPackages()
R2dbcOperations
getR2dbcOperations()
SchemaGenerate
getSchemaGenerate()
boolean
isBatchGenerate()
void
setBatchGenerate(boolean batchGenerate)
void
setDialect(Dialect dialect)
Sets the dialect.void
setPackages(java.util.List<java.lang.String> packages)
Sets the packages to include use for the purposes of schema generation.void
setSchemaGenerate(SchemaGenerate schemaGenerate)
Sets the schema generation strategy.
-
-
-
Constructor Detail
-
DataR2dbcConfiguration
public DataR2dbcConfiguration(@Parameter java.lang.String name, @Parameter io.r2dbc.spi.ConnectionFactory connectionFactory, @Parameter R2dbcOperations r2dbcOperations)
The configuration.- Parameters:
name
- The configuration nameconnectionFactory
- The connection factoryr2dbcOperations
- The operations
-
-
Method Detail
-
getR2dbcOperations
public R2dbcOperations getR2dbcOperations()
- Returns:
- The R2DBC operations.
-
getConnectionFactory
public io.r2dbc.spi.ConnectionFactory getConnectionFactory()
- Returns:
- The connection factory.
-
getSchemaGenerate
public SchemaGenerate getSchemaGenerate()
- Returns:
- The schema generation strategy.
-
setSchemaGenerate
public void setSchemaGenerate(SchemaGenerate schemaGenerate)
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
public java.util.List<java.lang.String> getPackages()
- Returns:
- The packages to include use for the purposes of schema generation.
-
setPackages
public void setPackages(java.util.List<java.lang.String> packages)
Sets the packages to include use for the purposes of schema generation.- Parameters:
packages
- The packages
-
getDialect
public Dialect getDialect()
- Returns:
- The dialect to use.
-
setDialect
public void setDialect(Dialect dialect)
Sets the dialect.- Parameters:
dialect
- The dialect
-
getName
@NonNull public java.lang.String getName()
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
-