kundera icon indicating copy to clipboard operation
kundera copied to clipboard

Where and spaces

Open sachur opened this issue 14 years ago • 9 comments

Hi, I like to make the following query :

SELECT ... WHERE key=value

value where there is a space between words.

For example: SELECT ... WHERE state=Very Good;

Any help?

sachur avatar Oct 03 '12 09:10 sachur

I guess, it should work for you without any issue.

-Vivek

mevivs avatar Oct 03 '12 10:10 mevivs

Does not work, I tried to enclose it in single and double quotes, and nothing

sachur avatar Oct 03 '12 11:10 sachur

This is what i have tried with PersonCassandraTest.

Select p from PersonCassandra where p.name = vivek mishra

And it is working for me. Also this is what i have tried on 2.1 release.

You can modify and test it by yourself, here it is:

https://github.com/impetus-opensource/Kundera/blob/trunk/kundera-cassandra/src/test/java/com/impetus/client/crud/PersonCassandraTest.java

-Vivek

mevivs avatar Oct 03 '12 11:10 mevivs

In that line? Can not find it

sachur avatar Oct 03 '12 11:10 sachur

have a look at: assertFindByName // line 128.

you need to modify prepareData method to set name as vivek mishra and then replace:

    assertFindByName(em, "PersonCassandra", PersonCassandra.class, "vivek", "personName");

with assertFindByName(em, "PersonCassandra", PersonCassandra.class, "vivek mishra", "personName");

mevivs avatar Oct 03 '12 11:10 mevivs

I tried that and it does not work :(

sachur avatar Oct 03 '12 14:10 sachur

Really strange. i will modify test class accordingly and will post on update. Not sure why is it not working for you.

-Vivek

mevivs avatar Oct 03 '12 15:10 mevivs

Now if it works, I was not using either method. Sorry for the inconvenience.

Thanks

sachur avatar Oct 04 '12 09:10 sachur

Great. closing it now.

-Vivek

mevivs avatar Oct 04 '12 09:10 mevivs