- 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_3instead -
Method Summary
Modifier and TypeMethodDescriptionabstract StringBuilderappendLiteral(String value, StringBuilder sb) Appendsvalueas a CHAR literal with the right quotes and escaping for this quote strategy tosb.abstract StringBuilderappendQuoted(String objectName, StringBuilder sb) Appends theobjectNamewith (or in the case of dialect 1: without) quotes tosb.static QuoteStrategyforDialect(int dialect) Obtain theQuoteStrategyfor the specified dialect.quoteLiteral(String value) Returnsvalueas a CHAR literal with the right quotes and escaping for this quote strategy.abstract StringquoteObjectName(String objectName) Returns the object name appropriately quoted according to this quote strategy.static QuoteStrategyReturns 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_1insteadBasically an alias forDIALECT_1for backwards compatibility. -
QUOTES
Deprecated, for removal: This API element is subject to removal in a future version.Will be removed in Jaybird 7, useDIALECT_3insteadBasically an alias forDIALECT_3for 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 theobjectNamewith (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
Appendsvalueas 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
Returnsvalueas 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 theQuoteStrategyfor the specified dialect.- Parameters:
dialect- Dialect- Returns:
- Appropriate
QuoteStrategy
-
DIALECT_1instead