Package org.neo4j.jdbc.translator.impl
Class SqlToCypherConfig
java.lang.Object
org.neo4j.jdbc.translator.impl.SqlToCypherConfig
Configuration for the
SqlToCypher, use this to configure parsing and rendering
settings as well as table to node mappings.- Author:
- Michael Hunger, Michael J. Simons
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder to create new instances ofconfigurations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA constant property name to make the translator always escape literal names.static final StringA constant property name for enabling the local translator cache.static final StringA constant property name for enabling pretty formatted Cypher statements. -
Method Summary
Modifier and TypeMethodDescriptionorg.jooq.conf.Settingsorg.jooq.conf.SettingsasSettings(org.jooq.conf.ParseWithMetaLookups withMetaLookups) static SqlToCypherConfig.Builderbuilder()A builder for creating newconfiguration objects.static SqlToCypherConfigProvides access to the default configuration.Returns the mapping from join columns to relationship types.org.jooq.conf.ParseNameCaseReturns the case in which names are parsed.Returns the prefixed that is recognized when parsing named parameters.Returns the precedence of the translator.org.jooq.conf.RenderNameCaseReturns the case in which names are rendered.org.jooq.SQLDialectReturns the configured SQL dialect for parsing.Returns the mapping from table names to labels.booleanReturns whether Cypher names are always escapd or not.booleanReturns whether the internal cache is enabled or not.booleanReturns whether jOOQ diagnostic logging is enabled.booleanReturns whether pretty printing of Cypher statements is enabled or not.modify()Allows modifying this configuration.static SqlToCypherConfigDerives a configuration forSql2Cypherbased from the properties given.
-
Field Details
-
PROPERTY_ALWAYS_ESCAPE_NAMES
A constant property name to make the translator always escape literal names.- See Also:
-
PROPERTY_PRETTY_PRINT_CYPHER
A constant property name for enabling pretty formatted Cypher statements.- See Also:
-
PROPERTY_ENABLE_CACHE
A constant property name for enabling the local translator cache.- See Also:
-
-
Method Details
-
of
Derives a configuration forSql2Cypherbased from the properties given.- Parameters:
config- will be searched for values under keys prefixed withs2c.- Returns:
- a new configuration object or the default config if there are no matching properties.
-
builder
A builder for creating newconfiguration objects.- Returns:
- a new builder for creating a new configuration from scratch.
-
defaultConfig
Provides access to the default configuration.- Returns:
- the default configuration ready to use.
-
modify
Allows modifying this configuration.- Returns:
- builder with all settings from this instance
-
getParseNameCase
public org.jooq.conf.ParseNameCase getParseNameCase()Returns the case in which names are parsed.- Returns:
- the case in which names are parsed
-
getRenderNameCase
public org.jooq.conf.RenderNameCase getRenderNameCase()Returns the case in which names are rendered.- Returns:
- the case in which names are rendered
-
isJooqDiagnosticLogging
public boolean isJooqDiagnosticLogging()Returns whether jOOQ diagnostic logging is enabled.- Returns:
- whether jOOQ diagnostic logging is enabled
-
getTableToLabelMappings
Returns the mapping from table names to labels.- Returns:
- the mapping from table names to labels
-
getJoinColumnsToTypeMappings
Returns the mapping from join columns to relationship types.- Returns:
- the mapping from join columns to relationship types
-
getSqlDialect
public org.jooq.SQLDialect getSqlDialect()Returns the configured SQL dialect for parsing.- Returns:
- the configured SQL dialect for parsing
-
isPrettyPrint
public boolean isPrettyPrint()Returns whether pretty printing of Cypher statements is enabled or not.- Returns:
- whether pretty printing of Cypher statements is enabled or not
-
isAlwaysEscapeNames
public boolean isAlwaysEscapeNames()Returns whether Cypher names are always escapd or not.- Returns:
- whether Cypher names are always escapd or not
-
getParseNamedParamPrefix
Returns the prefixed that is recognized when parsing named parameters.- Returns:
- the prefixed that is recognized when parsing named parameters
-
isCacheEnabled
public boolean isCacheEnabled()Returns whether the internal cache is enabled or not.- Returns:
- whether the internal cache is enabled or not
-
getPrecedence
Returns the precedence of the translator.- Returns:
- the precedence of the translator
-
asSettings
public org.jooq.conf.Settings asSettings() -
asSettings
public org.jooq.conf.Settings asSettings(org.jooq.conf.ParseWithMetaLookups withMetaLookups)
-