문제

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