Module org.neo4j.cypherdsl.core
Class Configuration.Builder
java.lang.Object
org.neo4j.cypherdsl.core.renderer.Configuration.Builder
- Enclosing class:
- Configuration
Use this builder to create new
Configuration instances.-
Method Summary
Modifier and TypeMethodDescriptionalwaysEscapeNames(boolean alwaysEscapeNames) Configure whether names should be always escaped.build()withDialect(Dialect dialect) Use a configuration with a dialect fitting your target database if the default dialect forNeo4j 4.x and earlierleads to incompatible results with your version of Neo4j.withEnforceSchema(boolean enforceSchema) Configure whether to enforce a schema or not.withGeneratedNames(boolean useGeneratedNames) Configure whether variable names should be always generated.withGeneratedNames(Set<Configuration.GeneratedNames> useGeneratedNames) Configure for which type of object generated names should be used.withIndentSize(int indentSize) withIndentStyle(Configuration.IndentStyle indentStyle) withPrettyPrint(boolean prettyPrint) Enables or disables pretty printing.withRelationshipDefinition(Configuration.RelationshipDefinition relationshipDefinition) Adds a new relationship definition to the current schema.
-
Method Details
-
withPrettyPrint
Enables or disables pretty printing. Enabling pretty printing will disable unnecessary escaping of labels and types.- Parameters:
prettyPrint- use true for enabling pretty printing- Returns:
- this builder
-
withIndentStyle
- Parameters:
indentStyle- The new indentation style- Returns:
- this builder
-
withIndentSize
- Parameters:
indentSize- The new indentation size- Returns:
- this builder
-
alwaysEscapeNames
Configure whether names should be always escaped.- Parameters:
alwaysEscapeNames- use true to always escape names- Returns:
- this builder
-
withGeneratedNames
Configure whether variable names should be always generated.- Parameters:
useGeneratedNames- Set to true to use generated symbolic names, parameter names and aliases- Returns:
- this builder
-
withGeneratedNames
public Configuration.Builder withGeneratedNames(Set<Configuration.GeneratedNames> useGeneratedNames) Configure for which type of object generated names should be used.- Parameters:
useGeneratedNames- The set of objects for which generated names should be used- Returns:
- this builder
-
withDialect
Use a configuration with a dialect fitting your target database if the default dialect forNeo4j 4.x and earlierleads to incompatible results with your version of Neo4j.- Parameters:
dialect- The new dialect- Returns:
- This builder. You can both use the original or this instance.
- Since:
- 2022.3.0
-
withRelationshipDefinition
@API(status=EXPERIMENTAL, since="2023.7.0") public Configuration.Builder withRelationshipDefinition(Configuration.RelationshipDefinition relationshipDefinition) Adds a new relationship definition to the current schema.- Parameters:
relationshipDefinition- A new relationship definition- Returns:
- this builder
- Since:
- 2023.7.0
-
withEnforceSchema
@API(status=EXPERIMENTAL, since="2023.7.0") public Configuration.Builder withEnforceSchema(boolean enforceSchema) Configure whether to enforce a schema or not.- Parameters:
enforceSchema- Set to true to enforce the schema defined by knownrelationship definitions.- Returns:
- this builder
- Since:
- 2023.7.0
-
build
- Returns:
- a new immutable configuration
-