Thanks Dan! 🙂
________________________________
Å alje: Dan Smith <dsm...@pivotal.io>
Poslano: 11. ožujka 2020. 18:34
Prima: user@geode.apache.org <user@geode.apache.org>
Predmet: Re: Binary data in OQL statement

I think it's definitely doable, but it might take a wrapper class to check for 
equality. Assuming r.p1 is a byte[] field, then r.p1=XXX is going to try to use 
java's equals method for byte[], which is going to compare instances, not 
bytes. You could wrap the byte[] in an object that implements equals, if you 
can add objects to server classpath.

-Dan



On Wed, Mar 11, 2020 at 1:22 AM Mario Kevo <mario.k...@est.tech> wrote:
Hi all,

I have questions about using binary data in OQL statement.
Is binary data supported to be used as a condition in the OQL statement. 
Something like SELECT * FROM /myregion r WHERE r.p1='BIN_DAT1' and 
r.p2='BIN_DAT2' when BIN_DAT1 and BIN_DAT2 are both binary data?

Another question is about the primary key. As I explored the header files in 
the native client, it seems Geode doesn’t support binary as the primary key. I 
tried setting a binary key like std::string(char*, size) and got 
std::rang_error. I’m not sure if I use the API in the correct way. Can you 
confirm this?

Thanks and BR,
Mario

Reply via email to