From the docs
BlobProperty - Uninterpreted byte string: if you set indexed=True, up to 500 characters, indexed;
All you will get is string comparison.
题
If I have an AppEngine datastore field that contains a ShortBlob entry (i.e. a byte[] of length 500 or less), and I do a query on this field with an inequality filter or a sort-order, are the bytes interpreted as signed values for the required comparisons?
For example, is [0xC0, 0x00]
considered larger (interpreted as unsigned) or smaller (interpreted as signed, i.e. [-0x40, 0x00]
) than [0x00, 0x00]
?
How about the byte order? Is it LSB or MSB? I.e. is [0x10, 0x00]
considered larger or smaller than [0x00, 0x10]
?
解决方案
From the docs
BlobProperty - Uninterpreted byte string: if you set indexed=True, up to 500 characters, indexed;
All you will get is string comparison.