1

I have a requirement where I need to build query dynamically i.e., which columns to select, from which tables and which joins to use.

Is there any existing library that I can use?

I have already looked into Spring Projections but it doesn't serve the purpose. It requires projection (interface) needed to be defined before hand.

I am also looking at JOOQ. It looks like it may serve the purpose but before I dig into this, I wanted to see if there is anything built into Spring or there are any other better option?

P.S: I need queries for Azure SQL Dialect

Harry Coder
  • 2,429
  • 2
  • 28
  • 32
Em Ae
  • 8,167
  • 27
  • 95
  • 162
  • Try this link: https://stackoverflow.com/questions/69687817/how-to-have-filtering-of-multiple-parameters-passed-as-requestparams-in-spring-d/69688578#69688578 – Harry Coder Jul 27 '22 at 02:16

1 Answers1

0

jOOQ's dynamic SQL support answers pretty much all of your questions. I'm not aware of anything by Spring itself that can model jOOQ's support for complex dynamic SQL

Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509