Class DataJdbcConfiguration
java.lang.Object
io.micronaut.data.jdbc.config.DataJdbcConfiguration
- All Implemented Interfaces:
io.micronaut.core.naming.Named, io.micronaut.core.util.Toggleable
@EachProperty(value="datasources",
primary="default")
public class DataJdbcConfiguration
extends Object
implements io.micronaut.core.naming.Named, io.micronaut.core.util.Toggleable
Configuration for Data JDBC.
- Since:
- 1.0.0
- Author:
- graemerocher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull IntegerGets the default fetch size for the JDBC driver.@NonNull StringgetName()@Nullable StringbooleanbooleanbooleanbooleanvoidsetAllowConnectionPerOperation(boolean allowConnectionPerOperation) voidsetBatchGenerate(boolean batchGenerate) voidsetDefaultFetchSize(@NonNull Integer defaultFetchSize) Sets the default fetch size for the JDBC driver.voidsetDialect(Dialect dialect) Sets the dialect.voidsetEnabled(boolean enabled) Sets an indicator telling whether data source is enabled.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) voidsetUniqueResultOnFindOne(boolean uniqueResultOnFindOne)
-
Field Details
-
PREFIX
-
-
Constructor Details
-
DataJdbcConfiguration
The configuration.- Parameters:
name- The configuration name
-
-
Method Details
-
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
-
isAllowConnectionPerOperation
public boolean isAllowConnectionPerOperation()- Returns:
- true if property is set
-
setAllowConnectionPerOperation
public void setAllowConnectionPerOperation(boolean allowConnectionPerOperation) - Parameters:
allowConnectionPerOperation- The property
-
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
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets an indicator telling whether data source is enabled.- Parameters:
enabled- an indicator telling whether data source is enabled
-
isUniqueResultOnFindOne
public boolean isUniqueResultOnFindOne()- Returns:
- Is unique result required on find one
-
setUniqueResultOnFindOne
public void setUniqueResultOnFindOne(boolean uniqueResultOnFindOne) - Parameters:
uniqueResultOnFindOne- Is unique result required on find one
-
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
-