drizzle
Profile
Search
 
Hosted by The Rackspace Cloud
JDBC/DataTypeNotes

DataTypes

Time

Since Drizzle does not support the JDBC Time datatype, it is stored as milliseconds in an integer in the database.

Format is like this

| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| mS | mS | mS | mS | mS | mS | mS | mS |
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| mS | mS | mS | mS | mS | mS | mS | SS |
| 15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 |
| SS | SS | SS | SS | SS | MM | MM | MM |
| 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00 |
| MM | MM | MM | HH | HH | HH | HH | HH |

Look at Utils.java for more information about how it is implemented

Bytes

The setBytes(...) method on a PreparedStatement inserts an array of bytes in a binary datatype. This differs from the way Connector/J handles byte arrays - it converts it to a hex string and inserts that (correct me if i'm wrong!).