質問

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.

役に立ちましたか?

解決

The blob literal must be started with "0x"

INSERT INTO commits (hash, tid, keyframe) VALUES (0x0b5db8b91bfdeb0a304b372dd8dda123b3fd1ab6, now(), true);
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top