Interface SqlStringGenerationContext
-
public interface SqlStringGenerationContext
A context provided to methods responsible for generating SQL strings on startup.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Identifier
catalogWithDefault(Identifier explicitCatalogOrNull)
String
format(QualifiedName qualifiedName)
Render a formatted non-table and non-sequence qualified nameString
format(QualifiedSequenceName qualifiedName)
Render a formatted sequence nameString
format(QualifiedTableName qualifiedName)
Render a formatted a table nameString
formatWithoutCatalog(QualifiedSequenceName qualifiedName)
Render a formatted sequence name, without the catalog (even the default one).String
formatWithoutDefaults(QualifiedTableName qualifiedName)
Render a formatted a table name, ignoring the default catalog/schema.Identifier
getDefaultCatalog()
Identifier
getDefaultSchema()
Dialect
getDialect()
IdentifierHelper
getIdentifierHelper()
Identifier
schemaWithDefault(Identifier explicitSchemaOrNull)
-
-
-
Method Detail
-
getDialect
Dialect getDialect()
- Returns:
- The database dialect of the current JDBC environment, to generate SQL fragments that are specific to each vendor.
-
getIdentifierHelper
IdentifierHelper getIdentifierHelper()
- Returns:
- The helper for dealing with identifiers in the current JDBC environment.
Note that the Identifiers returned from this helper already account for auto-quoting.
-
getDefaultCatalog
Identifier getDefaultCatalog()
- Returns:
- The default catalog, used for table/sequence names that do not explicitly mention a catalog.
May be
null
. This default is generally applied automatically by theformat methods
, but in some cases it can be useful to access it directly.
-
catalogWithDefault
Identifier catalogWithDefault(Identifier explicitCatalogOrNull)
- Parameters:
explicitCatalogOrNull
- An explicitly configured catalog, ornull
.- Returns:
- The given identifier if non-
null
, or the default catalog otherwise.
-
getDefaultSchema
Identifier getDefaultSchema()
- Returns:
- The default schema, used for table/sequence names that do not explicitly mention a schema.
May be
null
. This default is generally applied automatically by theformat methods
, but in some cases it can be useful to access it directly.
-
schemaWithDefault
Identifier schemaWithDefault(Identifier explicitSchemaOrNull)
- Parameters:
explicitSchemaOrNull
- An explicitly configured schema, ornull
.- Returns:
- The given identifier if non-
null
, or the default schema otherwise.
-
format
String format(QualifiedTableName qualifiedName)
Render a formatted a table name- Parameters:
qualifiedName
- The table name- Returns:
- The formatted name,
-
formatWithoutDefaults
String formatWithoutDefaults(QualifiedTableName qualifiedName)
Render a formatted a table name, ignoring the default catalog/schema.- Parameters:
qualifiedName
- The table name- Returns:
- The formatted name
-
format
String format(QualifiedSequenceName qualifiedName)
Render a formatted sequence name- Parameters:
qualifiedName
- The sequence name- Returns:
- The formatted name
-
format
String format(QualifiedName qualifiedName)
Render a formatted non-table and non-sequence qualified name- Parameters:
qualifiedName
- The name- Returns:
- The formatted name
-
formatWithoutCatalog
String formatWithoutCatalog(QualifiedSequenceName qualifiedName)
Render a formatted sequence name, without the catalog (even the default one).- Parameters:
qualifiedName
- The sequence name- Returns:
- The formatted name
-
-