datastax/java-driver — pull request #191 by flarcher (2014-06-30 08:16:16+00:00)
Title: Makes public UDTDefinition's constructor

Makes able to create an instance of UDTValue with the knowledge of the structure of the User Defined Type.

Example
-
CREATE TYPE IF NOT EXISTS my_type ( bla ascii, val int);
CREATE TABLE IF NOT EXISTS udt_table (key uuid, udt my_type, PRIMARY KEY (key));
Usually, we do ;

INSERT INTO udt_table (key, udt) VALUES (?, { bla : ?, val : ? });
But it would also allow from the Java driver (the second parameter is an instance of UDTValue) ;

INSERT INTO udt_table (key, udt) VALUES (?, ?);