Question

I am trying to run the following command in cqlsh:

cqlsh:testreducedb> INSERT INTO commits (hash, tid, keyframe) VALUES (0b5db8b91bfdeb0a304b372dd8dda123b3fd1ab6, now(), true);

I am guessing that I am getting an error because the column hash is of type blob but I am trying to insert that commit hash 0b5db8b91bfdeb0a304b372dd8dda123b3fd1ab6.

How do you insert this in cqlsh?

Also I am getting the following error when running that command:

Bad Request: line 1:63 mismatched character '1' expecting '-'

Not very helpful to me, don't really know how to deal with it.

Was it helpful?

Solution

The blob literal must be started with "0x"

INSERT INTO commits (hash, tid, keyframe) VALUES (0x0b5db8b91bfdeb0a304b372dd8dda123b3fd1ab6, now(), true);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top