MySQL 5.6.14 Source Code Document
|
Classes | |
interface | CharsetConverter |
interface | EndianManager |
class | MultiByteCharsetConverter |
class | SingleByteCharsetConverter |
Static Public Member Functions | |
static CharsetMap | getCharsetMap () |
static boolean | isRetriable (ClusterJDatastoreException ex) |
static ByteBuffer | convertValue (Column storeColumn, byte[] value) |
static ByteBuffer | convertValue (Column storeColumn, BigDecimal value) |
static ByteBuffer | convertValue (Column storeColumn, BigInteger value) |
static ByteBuffer | convertValue (Column storeColumn, double value) |
static ByteBuffer | convertValue (Column storeColumn, float value) |
static ByteBuffer | convertValue (Column storeColumn, byte value) |
static ByteBuffer | convertValue (Column storeColumn, short value) |
static ByteBuffer | convertValue (Column storeColumn, int value) |
static ByteBuffer | convertValue (Column storeColumn, long value) |
static void | fixBufferPrefixLength (String columnName, ByteBuffer byteBuffer, int offset) |
static String | dumpBytes (byte[] bytes) |
static String | dumpBytes (ByteBuffer byteBuffer) |
static BigDecimal | getDecimal (ByteBuffer byteBuffer, int length, int precision, int scale) |
static BigInteger | getBigInteger (ByteBuffer byteBuffer, int length, int precision, int scale) |
static String | getDecimalString (ByteBuffer byteBuffer, int length, int precision, int scale) |
static long | unpackDate (int packedDate) |
static long | unpackTime (int packedTime) |
static String | decode (byte[] array, int collation) |
static byte[] | encode (String string, int collation) |
static ByteBuffer | encodeToByteBuffer (CharSequence string, int collation, int prefixLength) |
static ByteBuffer | encode (String input, Column storeColumn, BufferManager bufferManager) |
static String | decode (ByteBuffer inputByteBuffer, int collation, BufferManager bufferManager) |
static int | getDecimalColumnSpace (int precision, int scale) |
static boolean | getBoolean (Column storeColumn, NdbRecAttr ndbRecAttr) |
static byte | getByte (Column storeColumn, NdbRecAttr ndbRecAttr) |
static short | getShort (Column storeColumn, NdbRecAttr ndbRecAttr) |
static int | getInt (Column storeColumn, NdbRecAttr ndbRecAttr) |
static long | getLong (Column storeColumn, NdbRecAttr ndbRecAttr) |
static long | convertLongValueForStorage (Column storeColumn, long value) |
static int | convertByteValueForStorage (Column storeColumn, byte value) |
static int | convertShortValueForStorage (Column storeColumn, short value) |
Static Protected Member Functions | |
static short | swap (short value) |
static int | swap (int value) |
static long | swap (long value) |
static void | throwError (Object returnCode, NdbErrorConst ndbError) |
static void | throwError (Object returnCode, NdbErrorConst ndbError, String extra) |
static ByteBuffer | convertValue (Column storeColumn, String value) |
static ByteBuffer | convertValueForLikeFilter (Column storeColumn, String value) |
static ByteBuffer | convertValueForLikeFilter (Column storeColumn, byte[] value) |
static long | packDatetime (long value) |
static long | unpackDatetime (long packedDatetime) |
static String | decode (ByteBuffer inputByteBuffer, int collation) |
Static Protected Attributes | |
static final int | collationUTF16 = charsetMap.getUTF16CharsetNumber() |
This class provides utility methods.
Definition at line 57 of file Utility.java.
|
inlinestatic |
Convert a byte value into an int for storage. The value parameter may be a bit, a bit array (BIT(1..8) needs to be stored as an int) or a byte value. The storage format depends on the type of the column and the endian-ness of the host.
storeColumn | the column |
value | the java value |
Definition at line 1881 of file Utility.java.
|
inlinestatic |
Convert a long value into a long for storage. The value parameter may be a date (milliseconds since the epoch), a bit array, or simply a long value. The storage format depends on the type of the column and the endian-ness of the host.
storeColumn | the column |
value | the java value |
Definition at line 1869 of file Utility.java.
|
inlinestatic |
Convert a short value into an int for storage. The value parameter may be a bit array (BIT(1..16) needs to be stored as an int) or a short value. The storage format depends on the type of the column and the endian-ness of the host.
storeColumn | the column |
value | the java value |
Definition at line 1893 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 794 of file Utility.java.
|
inlinestatic |
Convert a BigDecimal value to the binary decimal form used by MySQL. Use the precision and scale of the column to convert. Values that don't fit into the column throw a ClusterJUserException.
storeColumn | the column metadata |
value | the value to be converted |
Definition at line 854 of file Utility.java.
|
inlinestatic |
Convert a BigInteger value to the binary decimal form used by MySQL. Use the precision and scale of the column to convert. Values that don't fit into the column throw a ClusterJUserException.
storeColumn | the column metadata |
value | the value to be converted |
Definition at line 887 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 916 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 930 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 944 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 954 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 964 of file Utility.java.
|
inlinestatic |
Convert the parameter value to a ByteBuffer that can be passed to ndbjtie.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 974 of file Utility.java.
|
inlinestaticprotected |
Encode a String as a ByteBuffer that can be passed to ndbjtie. Put the length information in the beginning of the buffer. Pad fixed length strings with blanks.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 985 of file Utility.java.
|
inlinestaticprotected |
Encode a String as a ByteBuffer that can be passed to ndbjtie in a COND_LIKE filter. There is no length information in the beginning of the buffer.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 1006 of file Utility.java.
|
inlinestaticprotected |
Encode a byte[] as a ByteBuffer that can be passed to ndbjtie in a COND_LIKE filter. There is no length information in the beginning of the buffer.
storeColumn | the column definition |
value | the value to be converted |
Definition at line 1022 of file Utility.java.
|
inlinestatic |
Decode a byte[] into a String using the charset. The return value is in UTF16 format.
array | the byte[] to be decoded |
collation | the collation |
Definition at line 1343 of file Utility.java.
|
inlinestaticprotected |
Decode a ByteBuffer into a String using the charset. The return value is in UTF16 format.
inputByteBuffer | the byte buffer to be decoded |
collation | the collation |
Definition at line 1382 of file Utility.java.
|
inlinestatic |
Decode a ByteBuffer into a String using the charset. The return value is in UTF16 format.
inputByteBuffer | the byte buffer to be decoded positioned past the length prefix |
collation | the collation |
bufferManager | the buffer manager with shared buffers |
Definition at line 1491 of file Utility.java.
|
inlinestatic |
Convert the byte[] into a String to be used for logging and debugging.
bytes | the byte[] to be dumped |
Definition at line 1160 of file Utility.java.
|
inlinestatic |
Convert the byteBuffer into a String to be used for logging and debugging.
byteBuffer | the byteBuffer to be dumped |
Definition at line 1177 of file Utility.java.
|
inlinestatic |
Encode a String into a byte[] for storage. This is used by character large objects when mapping text columns.
string | the String to encode |
collation | the collation |
Definition at line 1417 of file Utility.java.
|
inlinestatic |
Encode a String into a ByteBuffer for storage.
input | the input String |
storeColumn | the store column |
bufferManager | the buffer manager with shared buffers |
Definition at line 1472 of file Utility.java.
|
inlinestatic |
Encode a String into a ByteBuffer using the mysql native encoding method.
string | the String to encode |
collation | the collation |
prefixLength | the length of the length prefix |
Definition at line 1433 of file Utility.java.
|
inlinestatic |
Fix the length information in a buffer based on the length prefix, either 0, 1, or 2 bytes that hold the length information.
byteBuffer | the byte buffer to fix |
offset | the size of the length prefix |
Definition at line 1060 of file Utility.java.
|
inlinestatic |
Get a boolean from this ndbRecAttr.
storeColumn | the Column |
ndbRecAttr | the NdbRecAttr |
Definition at line 1817 of file Utility.java.
|
inlinestatic |
Get a byte from this ndbRecAttr.
storeColumn | the Column |
ndbRecAttr | the NdbRecAttr |
Definition at line 1827 of file Utility.java.
|
inlinestatic |
The mysql charset map
Definition at line 152 of file Utility.java.
|
inlinestatic |
Get the number of bytes needed in memory to represent the decimal number.
precision | the precision of the number |
scale | the scale |
Definition at line 1804 of file Utility.java.
|
inlinestatic |
Get a Decimal String from the byte buffer.
byteBuffer | the byte buffer with the raw data, starting at position() |
length | the length of the data |
precision | the precision of the data |
scale | the scale of the data |
Definition at line 1232 of file Utility.java.
|
inlinestatic |
Get an int from this ndbRecAttr.
storeColumn | the Column |
ndbRecAttr | the NdbRecAttr |
Definition at line 1847 of file Utility.java.
|
inlinestatic |
Get a long from this ndbRecAttr.
storeColumn | the Column |
ndbRecAttr | the NdbRecAttr |
Definition at line 1857 of file Utility.java.
|
inlinestatic |
Get a short from this ndbRecAttr.
storeColumn | the Column |
ndbRecAttr | the NdbRecAttr |
Definition at line 1837 of file Utility.java.
|
inlinestatic |
Determine if the exception is retriable
ex | the exception |
Definition at line 215 of file Utility.java.
|
inlinestaticprotected |
Pack milliseconds since the Epoch into a long in database Datetime format. The Datetime contains a eight-byte date and time packed as YYYYx10000000000 + MMx100000000 + DDx1000000 + HHx10000 + MMx100 + SS Calendar month is 0 origin so add 1 to get packed month
value | milliseconds since the Epoch |
Definition at line 1140 of file Utility.java.
|
inlinestaticprotected |
Swap the bytes in the value, thereby converting a big-endian value into a little-endian value (or vice versa).
value | the value to be swapped |
Definition at line 737 of file Utility.java.
|
inlinestaticprotected |
Swap the bytes in the value, thereby converting a big-endian value into a little-endian value (or vice versa).
value | the value to be swapped |
Definition at line 747 of file Utility.java.
|
inlinestaticprotected |
Swap the bytes in the value, thereby converting a big-endian value into a little-endian value (or vice versa).
value | the value to be swapped |
Definition at line 759 of file Utility.java.
|
inlinestatic |
Unpack a Date from its packed int representation. Date is a three-byte integer packed as YYYYx16x32 + MMx32 + DD
packedDate | the packed representation |
Definition at line 1268 of file Utility.java.
|
inlinestaticprotected |
Unpack a Datetime from its packed long representation. The Datetime contains a long packed as YYYYx10000000000 + MMx100000000 + DDx1000000 + HHx10000 + MMx100 + SS Calendar month is 0 origin so subtract 1 from packed month
packedDatetime | the packed representation |
Definition at line 1312 of file Utility.java.
|
inlinestatic |
Unpack a Time from its packed int representation. Time is a three-byte integer packed as DDx240000 + HHx10000 + MMx100 + SS
packedTime | the packed representation |
Definition at line 1284 of file Utility.java.
|
staticprotected |
The mysql collation number for UTF16
Definition at line 149 of file Utility.java.