This repository was archived by the owner on Feb 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
CQL3 UUID type does not work #98
Comments
can you provide an example, I'm not quite sure what you mean. Also, we are in the midst of re-writing the entire CQL portion of the driver, so this may soon be addressed. |
conn.cql('INSERT INTO table (uuid) VALUES (?), [e988aea0-9682-11e2-9e96-0800200c9a66], ...)
//becomes INSERT INTO table (uuid) VALUES ('e988aea0-9682-11e2-9e96-0800200c9a66')
//instead of INSERT INTO table (uuid) VALUES (e988aea0-9682-11e2-9e96-0800200c9a66) UUID's are escaped in escapeCQL() and Cassandra reports an error because it expects UUIDs to not be in single quotes. This also includes when using the helenus UUID object because objects call toString and then are escaped. I added these to the escape function to get it working for the time being. if (typeof val === 'string' && val.match(/\w{8}\-\w{4}\-\w{4}\-\w{4}\-\w{12}/)) {
return val;
}
if (typeof val === 'object' && typeof val.hex) {
return val.toString();
} |
Confirm issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using the "uuid" column type with CQL3 there is no way to provide a uuid using the arguments because anything provided including the UUID object is escaped.
The text was updated successfully, but these errors were encountered: