Malaka Silva
Malaka Silva

Reputation: 142

ODATA4 filter to SQL where

I have created an odata service with postgrace database. I need to implement filter. For that I need to convert filter url params to jdbc where clause. Have anyone done this already?

Best Regards, Malaka Silva

Upvotes: 1

Views: 1793

Answers (2)

Bluemoon10
Bluemoon10

Reputation: 89

I would advise following the tutorials on the Olingo site they are quite good, specifically: Link to Olingo tutorail on $filter

Upvotes: 0

mat3e
mat3e

Reputation: 779

Implementing ExpressionVisitor interface from Apache Olingo (based on the tag I assume you use this library) is your way to go.

I did an example app with Spring, Hibernate and Apache Olingo and used the mentioned interface for creating a HQL query. You can see the code here and here and build on top of this with JDBC. App main directory: https://github.com/sollersconsulting/confitura2017/tree/master/snapgram.

Upvotes: 2

Related Questions