Saturday 15 September 2012

replace - querydsl - remove whitespace in the middle of a COLUMN -



replace - querydsl - remove whitespace in the middle of a COLUMN -

is there way query in querydsl?

select * table replace(column_name, ' ', '') = 'somevalue';

the stringpath qclass has no .replace() function , it's necessary characters (specifically, spaces in middle) removed column_name before testing somevalue.

sample column_name contents: abc, def, ab *

if somevalue abc, abc , ab* should appear.

you can express replace invocation via

expressions.stringtemplate("replace({0},' ','')", columnpath)

replace querydsl removing-whitespace

No comments:

Post a Comment