Package com.activeviam.database.api
Interface IDatabaseSettings
public interface IDatabaseSettings
Common settings for connecting to a database via DirectQuery.
Default values are:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Duration
static final IDatabaseSettings.GetByKeyBehavior
static final int
static final IDatabaseSettings.UseClusteringFields
-
Method Summary
Modifier and TypeMethodDescriptionTimeout (in seconds) which can be set on a query running on the external database during the feeding.While Get-by-key queries performed on the datastore are very fast, they can take a long time on external databases, solely due to the networking time.int
A query clustered by too many fields or by fields with a high cardinality can be divided in lots of sub queries.Returns whether clustering fields should be used for all queries or only forfeeding queries
.
-
Field Details
-
Method Details
-
maxSubQueriesAllowedInMultiStepQuery
int maxSubQueriesAllowedInMultiStepQuery()A query clustered by too many fields or by fields with a high cardinality can be divided in lots of sub queries. To avoid creating too many queries on the external database, a limit is set on the number of those sub queries. This property sets the limit.It is recommended to be conservative when increasing the limit. See documentation for more details.
Defaults to 500.
-
getByKeyBehavior
IDatabaseSettings.GetByKeyBehavior getByKeyBehavior()While Get-by-key queries performed on the datastore are very fast, they can take a long time on external databases, solely due to the networking time. When performing a Get-by-key query through DirectQuery, the possible behaviors are denying, warning, or allowing the query to run.Defaults to
DEFAULT_GET_BY_KEY_QUERY_BEHAVIOR
. -
useClusteringFields
IDatabaseSettings.UseClusteringFields useClusteringFields()Returns whether clustering fields should be used for all queries or only forfeeding queries
.Defaults to
DEFAULT_USE_CLUSTERING_FIELDS
. -
feedingQueryTimeout
Duration feedingQueryTimeout()Timeout (in seconds) which can be set on a query running on the external database during the feeding.Feeding queries are the ones run during the initial loading to feed the aggregate providers and hierarchies, and also during the refresh operations.
It defaults to 1 hour and cannot be less than a second.
This limit is only for external databases and does not impact queries on datastore.
Warning: increasing this value might result in longer queries and higher costs.
-