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
ConstructorsConstructorDescriptionDataR2dbcConfiguration(String name, io.r2dbc.spi.ConnectionFactory connectionFactory, jakarta.inject.Provider<R2dbcOperations> r2dbcOperations) The configuration. -
Method Summary
Modifier and TypeMethodDescriptionio.r2dbc.spi.ConnectionFactory@NonNull IntegerGets the default fetch size for the JDBC driver.@NonNull StringgetName()@Nullable StringbooleanvoidsetBatchGenerate(boolean batchGenerate) voidsetDefaultFetchSize(@NonNull Integer defaultFetchSize) Sets the default fetch size for the JDBC driver.voidsetDialect(Dialect dialect) Sets the dialect.voidsetPackages(List<String> packages) Sets the packages to include use for the purposes of schema generation.voidsetSchemaGenerate(SchemaGenerate schemaGenerate) Sets the schema generation strategy.voidsetSchemaGenerateName(@Nullable String schemaGenerateName) voidsetSchemaGenerateNames(@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
-
setPackages
-
getDialect
- Returns:
- The dialect to use.
-
setDialect
-
getName
- Specified by:
getNamein 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
-
setSchemaGenerateNames
-
getDefaultFetchSize
Gets the default fetch size for the JDBC driver. The fetch size is a hint to the JDBC driver as to the number of rows that should be fetched from the database when more rows are needed. If not set, the JDBC driver's default fetch size will be used. Used in streaming operations.- Returns:
- the default fetch size
-
setDefaultFetchSize
Sets the default fetch size for the JDBC driver. The fetch size is a hint to the JDBC driver as to the number of rows that should be fetched from the database when more rows are needed. If set to null, the JDBC driver's default fetch size will be used. Used in streaming operations.- Parameters:
defaultFetchSize- the default fetch size
-