- All Implemented Interfaces:
Serializable
,Comparable<QuoteStrategy>
,Constable
Strategy for quoting object names and literals (or no quoting of object names in the case of dialect 1).
This class is internal API of Jaybird. Future versions may radically change, move, or make inaccessible this type.
- Since:
- 2.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDialect 1 doesn't support quoting of object names, and uses double quotes for literals.Dialect 3 (and 2) supports quoting of object names, and uses single quotes for literals.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Will be removed in Jaybird 7, useDIALECT_3
instead -
Method Summary
Modifier and TypeMethodDescriptionabstract StringBuilder
appendLiteral
(String value, StringBuilder sb) Appendsvalue
as a CHAR literal with the right quotes and escaping for this quote strategy tosb
.abstract StringBuilder
appendQuoted
(String objectName, StringBuilder sb) Appends theobjectName
with (or in the case of dialect 1: without) quotes tosb
.static QuoteStrategy
forDialect
(int dialect) Obtain theQuoteStrategy
for the specified dialect.quoteLiteral
(String value) Returnsvalue
as a CHAR literal with the right quotes and escaping for this quote strategy.abstract String
quoteObjectName
(String objectName) Returns the object name appropriately quoted according to this quote strategy.static QuoteStrategy
Returns the enum constant of this class with the specified name.static QuoteStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIALECT_1
Dialect 1 doesn't support quoting of object names, and uses double quotes for literals.- Since:
- 6
-
DIALECT_3
Dialect 3 (and 2) supports quoting of object names, and uses single quotes for literals.- Since:
- 6
-
NO_QUOTES
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed in Jaybird 7, useDIALECT_1
insteadBasically an alias forDIALECT_1
for backwards compatibility. -
QUOTES
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed in Jaybird 7, useDIALECT_3
insteadBasically an alias forDIALECT_3
for backwards compatibility.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
appendQuoted
Appends theobjectName
with (or in the case of dialect 1: without) quotes tosb
.- Parameters:
objectName
- The object name to appendsb
- StringBuilder for appending- Returns:
- The StringBuilder for method chaining
-
quoteObjectName
Returns the object name appropriately quoted according to this quote strategy.- Parameters:
objectName
- The object name- Returns:
- The transformed object name
- Since:
- 3.0.6
-
appendLiteral
Appendsvalue
as a CHAR literal with the right quotes and escaping for this quote strategy tosb
.- Parameters:
value
- The value to append as a literalsb
- StringBuilder for appending- Returns:
- The StringBuilder for method chaining
- Since:
- 6
-
quoteLiteral
Returnsvalue
as a CHAR literal with the right quotes and escaping for this quote strategy.- Parameters:
value
- The value to append as a literal- Returns:
- The transformed value as a literal
- Since:
- 6
-
forDialect
Obtain theQuoteStrategy
for the specified dialect.- Parameters:
dialect
- Dialect- Returns:
- Appropriate
QuoteStrategy
-
DIALECT_1
instead