Keys are strings, typically enclosed by quotes for any given SDK.
taken from here
Does it mean that it is client limitation? For example my key is 64bit integer, as I understand I have to make it “human readable” string, like representing the number as string, or use more compact representation like encoding it as Base64, which still, will take more than just 8 bytes. So, why I cant store just raw bytes?
What @daschl says is correct, but a number of services will interpret the bytestring as UTF-8 and that’s what we test with using those services. You will be able to use the K-V service with binary keys, but you may see unexpected behavior from Views, N1QL or other services.
C from C++ and Java for Java apps
Actually, writing raw binary as key is possible as far as I remember, but it was 3 years ago, so I decided to check documentation.
Also, the documentation states
No spaces are allowed in a key.
which contradicts with your statement. So, is the documentation misguiding?