Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create "left" and "right" string manipulation functions in QueryDSL. #519

Closed
gmazza opened this issue Oct 15, 2013 · 3 comments
Closed

Create "left" and "right" string manipulation functions in QueryDSL. #519

gmazza opened this issue Oct 15, 2013 · 3 comments
Milestone

Comments

@gmazza
Copy link

@gmazza gmazza commented Oct 15, 2013

To accomplish this SQL statement in QueryDSL in a simple manner:
select left(right(my_string_column, 10), 5) from my_table;

Create "right" and "left" String manipulation methods to permit the following:
myTable.myStringColumn.right(10).left(5)

See: http://stackoverflow.com/questions/19361125/equivalent-of-left-and-right-sql-string-manipulation-functions-in-querydsl

timowest added a commit that referenced this issue Oct 16, 2013
@timowest
Copy link
Member

@timowest timowest commented Oct 16, 2013

left and right are now available via SQLExpressions as static methods.

@gmazza
Copy link
Author

@gmazza gmazza commented Oct 19, 2013

Great, thanks for the quick response. (Though you may wish to add one more test case: String_Right_Left().)

timowest added a commit that referenced this issue Oct 19, 2013
@timowest
Copy link
Member

@timowest timowest commented Oct 20, 2013

Released in 3.2.4

@timowest timowest closed this Oct 20, 2013
@timowest timowest added this to the 3.2.4 milestone Apr 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants