public enum DisplayNameMode extends Enum<DisplayNameMode>
This mode determines the "visual style" of the output - whether to show raw SQL form with quotes, clean display form without quotes, or canonical form.
Note: This is separate from DisplayNamePolicy which determines
"which occurrence to use" when the same object appears multiple times with
different spellings.
SQL: SELECT [OrderID] FROM [dbo].[SalesOrder] DISPLAY: dbo.SalesOrder, OrderID (quotes stripped, case preserved) SQL_RENDER: [dbo].[SalesOrder], [OrderID] (quotes preserved) CANONICAL: dbo.salesorder, orderid (vendor-specific folding applied)
DisplayNamePolicy,
DisplayNameNormalizer| Enum Constant and Description |
|---|
CANONICAL
Canonical mode: apply vendor-specific case folding.
|
DISPLAY
Display mode: strip delimiters, preserve original case.
|
SQL_RENDER
SQL render mode: preserve delimiters for valid SQL regeneration.
|
| Modifier and Type | Method and Description |
|---|---|
static DisplayNameMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DisplayNameMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DisplayNameMode DISPLAY
Recommended for debugging and test output. Produces clean, readable output that reflects what the user wrote (minus the quote noise).
Examples:
[OrderID] → OrderID`kalyan-DB` → kalyan-DB"MyTable" → MyTablepublic static final DisplayNameMode SQL_RENDER
Use when output needs to be valid SQL that can be re-executed. Preserves necessary quotes/brackets for special characters and reserved words.
Examples:
[Order ID] → [Order ID] (space requires brackets)`kalyan-DB` → `kalyan-DB` (hyphen requires backticks)public static final DisplayNameMode CANONICAL
Produces output matching the database's internal canonical form. Useful for comparing against metadata or catalog information.
Examples (vendor-dependent):
MyTable → MYTABLE (unquoted folds to upper)MyTable → mytable (unquoted folds to lower)MyTable → MyTable (case-sensitive)public static DisplayNameMode[] values()
for (DisplayNameMode c : DisplayNameMode.values()) System.out.println(c);
public static DisplayNameMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null