BIT values can be cast to BINARY and vice-versa. In casts, BIT values are converted to their counterpart BINARY values by treating each set of 8 bits or less as a single byte. The first bit of a BIT string is treated as the most significant bit of the resulting byte value. Binary values are converted by treating the bits in the sequence of bytes as sequence of bits in the BIT string
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public int | canMoveFrom(Type otherType)
Overrides org. When canConvertFrom() is true, can convert without changing the object |
| pack-priv Object | castOrConvertToType(SessionInterface session, Object a, Type otherType, boolean cast)
Overrides org.
|
| public Object | castToType(SessionInterface session, Object a, Type otherType)
Overrides org. Explicit casts are handled by this method. |
| public int | |
| public Object | |
| public Object | convertJavaToSQL(SessionInterface session, Object a)
Overrides org.
|
| public Object | convertToDefaultType(SessionInterface session, Object a)
Overrides org. Converts the object to the given type without limit checks. |
| public void | |
| public String | |
| public String | |
| public Object | convertToType(SessionInterface session, Object a, Type otherType)
Overrides org. Same as castToType except for CHARACTER values. |
| public Object | convertToTypeLimits(SessionInterface session, Object a)
Overrides org.
|
| public int | |
| public Type | getAggregateType(Type other)
Overrides org. Common type used in comparison operations. |
| public static BinaryType | |
| public Type | getCombinedType(Session session, Type other, int operation)
Overrides org. Returns type for concat |
| public String | getDefinition()
Overrides org. Returns the full definition of the type, including parameters |
| public static BitSet | |
| public Class | |
| public String | getJDBCClassName()
Overrides org. Returns the JDBC class name of type, if it exists, otherwise the HSQLDB class name. |
| public int | getJDBCTypeCode()
Overrides org. Returns the JDBC type number of type, if it exists, otherwise the HSQLDB / SQL type. |
| public long | |
| public String | |
| pack-priv int | |
| public int | getSQLGenericTypeCode()
Overrides org. Returns the generic SQL CLI type number of type, if it exists, otherwise the HSQLDB type. |
| public boolean | |
| public BlobData | overlay(Session session, BlobData value, BlobData overlay, long offset, long length, boolean hasLength)
Overrides org.
|
| public long | position(SessionInterface session, BlobData data, BlobData otherData, Type otherType, long offset)
Overrides org.
|
| public boolean | |
| public BlobData | substring(SessionInterface session, BlobData data, long offset, long length, boolean hasLength)
Overrides org.
|
| maxBitPrecision | back to summary |
|---|---|
| pack-priv static final long maxBitPrecision | |
| BitType | back to summary |
|---|---|
| public BitType(int type, long precision) | |
| canConvertFrom | back to summary |
|---|---|
| public boolean canConvertFrom(Type otherType) Overrides org. | |
| canMoveFrom | back to summary |
|---|---|
| public int canMoveFrom(Type otherType) Overrides org. Doc from org. When canConvertFrom() is true, can convert without changing the object | |
| castOrConvertToType | back to summary |
|---|---|
| pack-priv Object castOrConvertToType(SessionInterface session, Object a, Type otherType, boolean cast) | |
| castToType | back to summary |
|---|---|
| public Object castToType(SessionInterface session, Object a, Type otherType) Overrides org. Doc from org. Explicit casts are handled by this method. SQL standard 6.12 rules for enforcement of size, precision and scale are implemented. For CHARACTER values, it performs truncation in all cases of long strings. | |
| compare | back to summary |
|---|---|
| public int compare(Session session, Object a, Object b) Overrides org. | |
| concat | back to summary |
|---|---|
| public Object concat(Session session, Object a, Object b) Overrides org. | |
| convertJavaToSQL | back to summary |
|---|---|
| public Object convertJavaToSQL(SessionInterface session, Object a) Overrides org. | |
| convertToDefaultType | back to summary |
|---|---|
| public Object convertToDefaultType(SessionInterface session, Object a) Overrides org. Doc from org. Converts the object to the given type without limit checks. Used for JDBC writes. | |
| convertToJSON | back to summary |
|---|---|
| public void convertToJSON(Object a, StringBuilder sb) Overrides org. | |
| convertToSQLString | back to summary |
|---|---|
| public String convertToSQLString(Object a) | |
| convertToString | back to summary |
|---|---|
| public String convertToString(Object a) Overrides org. | |
| convertToType | back to summary |
|---|---|
| public Object convertToType(SessionInterface session, Object a, Type otherType) Overrides org. Doc from org. Same as castToType except for CHARACTER values. Perform string truncation of trailing spaces only. For other long strings, it raises an exception. | |
| convertToTypeLimits | back to summary |
|---|---|
| public Object convertToTypeLimits(SessionInterface session, Object a) | |
| displaySize | back to summary |
|---|---|
| public int displaySize() Overrides org. | |
| getAggregateType | back to summary |
|---|---|
| public Type getAggregateType(Type other) Overrides org. Doc from org. Common type used in comparison operations. other must be comparable with this. | |
| getBitType | back to summary |
|---|---|
| public static BinaryType getBitType(int type, long precision) | |
| getCombinedType | back to summary |
|---|---|
| public Type getCombinedType(Session session, Type other, int operation) Overrides org. Returns type for concat | |
| getDefinition | back to summary |
|---|---|
| public String getDefinition() Overrides org. Doc from org. Returns the full definition of the type, including parameters | |
| getJavaBitSet | back to summary |
|---|---|
| public static BitSet getJavaBitSet(BinaryData data) | |
| getJDBCClass | back to summary |
|---|---|
| public Class Overrides org. | |
| getJDBCClassName | back to summary |
|---|---|
| public String getJDBCClassName() Overrides org. Doc from org. Returns the JDBC class name of type, if it exists, otherwise the HSQLDB class name. | |
| getJDBCTypeCode | back to summary |
|---|---|
| public int getJDBCTypeCode() Overrides org. Doc from org. Returns the JDBC type number of type, if it exists, otherwise the HSQLDB / SQL type. | |
| getMaxPrecision | back to summary |
|---|---|
| public long getMaxPrecision() Overrides org. | |
| getNameString | back to summary |
|---|---|
| public String getNameString() Overrides org. Doc from org. Returns the name of the type | |
| getRightTrimSize | back to summary |
|---|---|
| pack-priv int getRightTrimSize(BinaryData data) | |
| getSQLGenericTypeCode | back to summary |
|---|---|
| public int getSQLGenericTypeCode() Overrides org. Doc from org. Returns the generic SQL CLI type number of type, if it exists, otherwise the HSQLDB type. The generic type is returned for DATETIME and INTERVAL types. | |
| isBitType | back to summary |
|---|---|
| public boolean isBitType() Overrides org. | |
| overlay | back to summary |
|---|---|
| public BlobData overlay(Session session, BlobData value, BlobData overlay, long offset, long length, boolean hasLength) Overrides org. | |
| position | back to summary |
|---|---|
| public long position(SessionInterface session, BlobData data, BlobData otherData, Type otherType, long offset) Overrides org. | |
| requiresPrecision | back to summary |
|---|---|
| public boolean requiresPrecision() | |
| substring | back to summary |
|---|---|
| public BlobData substring(SessionInterface session, BlobData data, long offset, long length, boolean hasLength) Overrides org. | |