Enum DisplayNameMode
- All Implemented Interfaces:
Serializable,Comparable<DisplayNameMode>,java.lang.constant.Constable
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.
Example with SQL Server:
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)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCanonical mode: apply vendor-specific case folding.Display mode: strip delimiters, preserve original case.SQL render mode: preserve delimiters for valid SQL regeneration. -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayNameModeReturns 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.
-
Enum Constant Details
-
DISPLAY
Display mode: strip delimiters, preserve original case.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"→MyTable
-
SQL_RENDER
SQL render mode: preserve delimiters for valid SQL regeneration.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)
-
CANONICAL
Canonical mode: apply vendor-specific case folding.Produces output matching the database's internal canonical form. Useful for comparing against metadata or catalog information.
Examples (vendor-dependent):
- Oracle:
MyTable→MYTABLE(unquoted folds to upper) - PostgreSQL:
MyTable→mytable(unquoted folds to lower) - BigQuery:
MyTable→MyTable(case-sensitive)
- Oracle:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-