java.lang.Object
org.neo4j.cypherdsl.core.renderer.Configuration
This class provides some configuration settings for the Cypher-DSL, mainly around rendering of a statement. Instances
of
Configuration
are threadsafe and can be reused. Please use the associated builder
via newConfig()
to create new variants.- Since:
- 2021.0.1
- Author:
- Michael J. Simons
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Use this builder to create newConfiguration
instances.static enum
Enum for configuring name rewriting.static enum
Enum for the available indent styles.static final record
Simple definition of a known / schema relationship. -
Method Summary
Modifier and TypeMethodDescriptionstatic Configuration
Cypher is not pretty printed by default.boolean
int
Returns the indentation style.int
hashCode()
boolean
boolean
boolean
boolean
static Configuration.Builder
Returns a new builder.static Configuration
Pretty printing with default indentation settings.relationshipDefinition
(String definition) Creates a new relationship definition from a string in the form(sourceLabel, TYPE, targetLabel)
.toString()
-
Method Details
-
relationshipDefinition
Creates a new relationship definition from a string in the form(sourceLabel, TYPE, targetLabel)
.- Parameters:
definition
- The literal definition of the relationship- Returns:
- A new relationship definition
-
defaultConfig
Cypher is not pretty printed by default. No indentation settings apply.- Returns:
- the default config
-
prettyPrinting
Pretty printing with default indentation settings.- Returns:
- a configuration enabling pretty printing.
-
newConfig
Returns a new builder. for creating a new configuration from scratch- Returns:
- a new builder
-
isPrettyPrint
public boolean isPrettyPrint()- Returns:
- true if this configuration uses pretty printing
-
getIndentStyle
Returns the indentation style. whether to use tabs or spaces to indent things- Returns:
- the indentation style
-
getIndentSize
public int getIndentSize()- Returns:
- width of one indentation
-
isAlwaysEscapeNames
public boolean isAlwaysEscapeNames()- Returns:
- true when names should be always escaped
-
getGeneratedNames
- Returns:
- The set of object types for which generated names should be used
- Since:
- 2023.2.0
-
isUseGeneratedNames
public boolean isUseGeneratedNames()- Returns:
- true when symbolic and parameter names should be replaced with generated names
- Since:
- 2023.2.0
-
getDialect
- Returns:
- the target dialect
-
isEnforceSchema
@API(status=EXPERIMENTAL, since="2023.7.0") public boolean isEnforceSchema()- Returns:
- true if a schema should be enforced
- Since:
- 2023.7.0
-
getRelationshipDefinitions
@API(status=EXPERIMENTAL, since="2023.7.0") public Map<String,List<Configuration.RelationshipDefinition>> getRelationshipDefinitions()- Returns:
- A map of predefined relationships
- Since:
- 2023.7.0
-
equals
-
hashCode
public int hashCode() -
toString
-