Package org.neo4j.jdbc.translator.impl
Class SqlToCypherConfig.Builder
java.lang.Object
org.neo4j.jdbc.translator.impl.SqlToCypherConfig.Builder
- Enclosing class:
- SqlToCypherConfig
A builder to create new instances of
configurations.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Finishes building a new configuration.withAlwaysEscapeNames(boolean alwaysEscapeNames) Configure whether names should be always escaped.withCacheEnabled(boolean cacheSetting) Enables caching.withJoinColumnsToTypeMappings(Map<String, String> newJoinColumnsToTypeMappings) Applies new join column mappings.withJooqDiagnosticLogging(boolean enabled) Enables diagnostic logging for jOOQ.withParseNameCase(org.jooq.conf.ParseNameCase newParseNameCase) Configures how names should be parsed.withParseNamedParamPrefix(String parseNamedParamPrefix) Changes the prefix used for parsing named parameters.withPrecedence(Integer newPrecedence) Configures the precedence for theinstanceto be configured.withPrettyPrint(boolean prettyPrint) Enables or disables pretty printing of the generated Cypher queries.withRenderNameCase(org.jooq.conf.RenderNameCase newRenderNameCase) Configures how SQL names should be parsed.withSqlDialect(org.jooq.SQLDialect newSqlDialect) Applies a newSQLDialectfor both parsing and optionally rendering SQL.withTableToLabelMappings(Map<String, String> newTableToLabelMappings) Applies new table mappings.
-
Method Details
-
withParseNameCase
Configures how names should be parsed.- Parameters:
newParseNameCase- the new configuration- Returns:
- this builder
-
withRenderNameCase
Configures how SQL names should be parsed.- Parameters:
newRenderNameCase- the new configuration- Returns:
- this builder
-
withJooqDiagnosticLogging
Enables diagnostic logging for jOOQ.- Parameters:
enabled- set to true to enable diagnostic logging on the jOOQ side of things- Returns:
- this builder
-
withTableToLabelMappings
public SqlToCypherConfig.Builder withTableToLabelMappings(Map<String, String> newTableToLabelMappings) Applies new table mappings.- Parameters:
newTableToLabelMappings- the new mappings- Returns:
- this builder
-
withJoinColumnsToTypeMappings
public SqlToCypherConfig.Builder withJoinColumnsToTypeMappings(Map<String, String> newJoinColumnsToTypeMappings) Applies new join column mappings.- Parameters:
newJoinColumnsToTypeMappings- the new mappings- Returns:
- this builder
-
withSqlDialect
Applies a newSQLDialectfor both parsing and optionally rendering SQL.- Parameters:
newSqlDialect- the new sql dialect- Returns:
- this builder
-
withPrettyPrint
Enables or disables pretty printing of the generated Cypher queries.- Parameters:
prettyPrint- set to false to disable pretty printing- Returns:
- this builder
-
withParseNamedParamPrefix
Changes the prefix used for parsing named parameters. If set to null, the jOOQ default (:) is used.- Parameters:
parseNamedParamPrefix- the new prefix for parsing named parameters- Returns:
- this builder
-
withAlwaysEscapeNames
Configure whether names should be always escaped.- Parameters:
alwaysEscapeNames- use true to always escape names- Returns:
- this builder
-
withCacheEnabled
Enables caching.- Parameters:
cacheSetting- use true to enable caching- Returns:
- this builder
-
build
Finishes building a new configuration. The builder is safe to reuse afterward.- Returns:
- a new immutable configuration
-
withPrecedence
Configures the precedence for theinstanceto be configured. Lower values means higher precedence.- Parameters:
newPrecedence- the precedence to be configured.- Returns:
- this builder
-