Class SqlToCypherConfig.Builder

java.lang.Object
org.neo4j.jdbc.translator.impl.SqlToCypherConfig.Builder
Enclosing class:
SqlToCypherConfig

public static final class SqlToCypherConfig.Builder extends Object
A builder to create new instances of configurations.
  • Method Details

    • withParseNameCase

      public SqlToCypherConfig.Builder withParseNameCase(org.jooq.conf.ParseNameCase newParseNameCase)
      Configures how names should be parsed.
      Parameters:
      newParseNameCase - the new configuration
      Returns:
      this builder
    • withRenderNameCase

      public SqlToCypherConfig.Builder withRenderNameCase(org.jooq.conf.RenderNameCase newRenderNameCase)
      Configures how SQL names should be parsed.
      Parameters:
      newRenderNameCase - the new configuration
      Returns:
      this builder
    • withJooqDiagnosticLogging

      public SqlToCypherConfig.Builder withJooqDiagnosticLogging(boolean enabled)
      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

      public SqlToCypherConfig.Builder withSqlDialect(org.jooq.SQLDialect newSqlDialect)
      Applies a new SQLDialect for both parsing and optionally rendering SQL.
      Parameters:
      newSqlDialect - the new sql dialect
      Returns:
      this builder
    • withPrettyPrint

      public SqlToCypherConfig.Builder withPrettyPrint(boolean prettyPrint)
      Enables or disables pretty printing of the generated Cypher queries.
      Parameters:
      prettyPrint - set to false to disable pretty printing
      Returns:
      this builder
    • withParseNamedParamPrefix

      public SqlToCypherConfig.Builder withParseNamedParamPrefix(String parseNamedParamPrefix)
      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

      public SqlToCypherConfig.Builder withAlwaysEscapeNames(boolean alwaysEscapeNames)
      Configure whether names should be always escaped.
      Parameters:
      alwaysEscapeNames - use true to always escape names
      Returns:
      this builder
    • withCacheEnabled

      public SqlToCypherConfig.Builder withCacheEnabled(boolean cacheSetting)
      Enables caching.
      Parameters:
      cacheSetting - use true to enable caching
      Returns:
      this builder
    • build

      public SqlToCypherConfig build()
      Finishes building a new configuration. The builder is safe to reuse afterward.
      Returns:
      a new immutable configuration
    • withPrecedence

      public SqlToCypherConfig.Builder withPrecedence(Integer newPrecedence)
      Configures the precedence for the instance to be configured. Lower values means higher precedence.
      Parameters:
      newPrecedence - the precedence to be configured.
      Returns:
      this builder