Class SqlValue
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<SqlValue.Builder,SqlValue>
One value. Exactly one member is set, and the column's type determines which member.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal SdkBytesA VARBINARY column value, as binary data.final BooleanA BOOLEAN column value.static SqlValue.Builderbuilder()final DoubleREAL and DOUBLE, except NaN and infinities, which arestringValue(NaN,Infinity,-Infinity).final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.static SqlValuefromBlobValue(SdkBytes blobValue) Create an instance of this class withblobValue()initialized to the given value.static SqlValuefromBooleanValue(Boolean booleanValue) Create an instance of this class withbooleanValue()initialized to the given value.static SqlValuefromDoubleValue(Double doubleValue) Create an instance of this class withdoubleValue()initialized to the given value.static SqlValuefromJsonValue(String jsonValue) Create an instance of this class withjsonValue()initialized to the given value.static SqlValuefromLongValue(Long longValue) Create an instance of this class withlongValue()initialized to the given value.static SqlValuefromNullValue(Boolean nullValue) Create an instance of this class withnullValue()initialized to the given value.static SqlValuefromStringValue(String stringValue) Create an instance of this class withstringValue()initialized to the given value.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final StringAn ARRAY, STRUCT, or MAP column value, as JSON text: an array, an object, and an array of{"key": ..., "value": ...}entries.final LongA TINYINT, SMALLINT, INTEGER, or BIGINT column value.final BooleanSpecifies whether the value is a SQL NULL.static Class<? extends SqlValue.Builder> final StringVARCHAR, and the types whose exact form is text: DECIMAL and unsigned 64-bit integers in plain notation, DATE (yyyy-MM-dd), TIME and TIMESTAMP (ISO-8601 at the column's precision;ZwhentimeZoneis set), and INTERVAL (ISO-8601 duration).Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.type()Retrieve an enum value representing which member of this object is populated.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
nullValue
Specifies whether the value is a SQL NULL. Always
truewhen present.- Returns:
- Specifies whether the value is a SQL NULL. Always
truewhen present.
-
booleanValue
-
longValue
A TINYINT, SMALLINT, INTEGER, or BIGINT column value.
- Returns:
- A TINYINT, SMALLINT, INTEGER, or BIGINT column value.
-
doubleValue
REAL and DOUBLE, except NaN and infinities, which are
stringValue(NaN,Infinity,-Infinity).- Returns:
- REAL and DOUBLE, except NaN and infinities, which are
stringValue(NaN,Infinity,-Infinity).
-
stringValue
VARCHAR, and the types whose exact form is text: DECIMAL and unsigned 64-bit integers in plain notation, DATE (
yyyy-MM-dd), TIME and TIMESTAMP (ISO-8601 at the column's precision;ZwhentimeZoneis set), and INTERVAL (ISO-8601 duration). An UNKNOWN column's values are NULL. A non-null value of a type the service cannot return fails the request with ValidationException (cast the column to VARCHAR).- Returns:
- VARCHAR, and the types whose exact form is text: DECIMAL and unsigned 64-bit integers in plain notation,
DATE (
yyyy-MM-dd), TIME and TIMESTAMP (ISO-8601 at the column's precision;ZwhentimeZoneis set), and INTERVAL (ISO-8601 duration). An UNKNOWN column's values are NULL. A non-null value of a type the service cannot return fails the request with ValidationException (cast the column to VARCHAR).
-
blobValue
A VARBINARY column value, as binary data.
- Returns:
- A VARBINARY column value, as binary data.
-
jsonValue
An ARRAY, STRUCT, or MAP column value, as JSON text: an array, an object, and an array of
{"key": ..., "value": ...}entries. Nested values follow the same rules, with NULL asnull.- Returns:
- An ARRAY, STRUCT, or MAP column value, as JSON text: an array, an object, and an array of
{"key": ..., "value": ...}entries. Nested values follow the same rules, with NULL asnull.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<SqlValue.Builder,SqlValue> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
fromNullValue
Create an instance of this class withnullValue()initialized to the given value.Specifies whether the value is a SQL NULL. Always
truewhen present.- Parameters:
nullValue- Specifies whether the value is a SQL NULL. Alwaystruewhen present.
-
fromBooleanValue
Create an instance of this class withbooleanValue()initialized to the given value.A BOOLEAN column value.
- Parameters:
booleanValue- A BOOLEAN column value.
-
fromLongValue
Create an instance of this class withlongValue()initialized to the given value.A TINYINT, SMALLINT, INTEGER, or BIGINT column value.
- Parameters:
longValue- A TINYINT, SMALLINT, INTEGER, or BIGINT column value.
-
fromDoubleValue
Create an instance of this class withdoubleValue()initialized to the given value.REAL and DOUBLE, except NaN and infinities, which are
stringValue(NaN,Infinity,-Infinity).- Parameters:
doubleValue- REAL and DOUBLE, except NaN and infinities, which arestringValue(NaN,Infinity,-Infinity).
-
fromStringValue
Create an instance of this class withstringValue()initialized to the given value.VARCHAR, and the types whose exact form is text: DECIMAL and unsigned 64-bit integers in plain notation, DATE (
yyyy-MM-dd), TIME and TIMESTAMP (ISO-8601 at the column's precision;ZwhentimeZoneis set), and INTERVAL (ISO-8601 duration). An UNKNOWN column's values are NULL. A non-null value of a type the service cannot return fails the request with ValidationException (cast the column to VARCHAR).- Parameters:
stringValue- VARCHAR, and the types whose exact form is text: DECIMAL and unsigned 64-bit integers in plain notation, DATE (yyyy-MM-dd), TIME and TIMESTAMP (ISO-8601 at the column's precision;ZwhentimeZoneis set), and INTERVAL (ISO-8601 duration). An UNKNOWN column's values are NULL. A non-null value of a type the service cannot return fails the request with ValidationException (cast the column to VARCHAR).
-
fromBlobValue
Create an instance of this class withblobValue()initialized to the given value.A VARBINARY column value, as binary data.
- Parameters:
blobValue- A VARBINARY column value, as binary data.
-
fromJsonValue
Create an instance of this class withjsonValue()initialized to the given value.An ARRAY, STRUCT, or MAP column value, as JSON text: an array, an object, and an array of
{"key": ..., "value": ...}entries. Nested values follow the same rules, with NULL asnull.- Parameters:
jsonValue- An ARRAY, STRUCT, or MAP column value, as JSON text: an array, an object, and an array of{"key": ..., "value": ...}entries. Nested values follow the same rules, with NULL asnull.
-
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beSqlValue.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beSqlValue.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set. -
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-