Thank you so much Evan and Douglas for taking the time to help.
I did end up going with your approach Douglas, I am using annotated SQL
where I can, but for the dynamic queries, I am using the jdbi handle and
executing the SQL that way.
In case anyone else finds this thread looking for similar help, I should
add that in my DAO class, I imported the following class which comes
bundled with dropwizard
Then, I made my class implement GetHandle, by doing that, I can then do
in order to get access to the database connection.
On Friday, October 14, 2016 at 1:15:11 PM UTC-7, Kim Kantola wrote:
> Hi All,
> I am new to JDBI. I have seen several simple examples of annotating a DAO
> with a query like "Select * from tableName where id=?".
> Could someone point me to documentation for more complex queries such as
> searching by a dynamic list of parameters? For example, a user can search
> by name, age, id, height, etc, but I am unaware until runtime which
> combination of these search parameters may come in to my search method. I
> may not get a search value for age, and so do not need to bind anything to
> the search query for that.
> Any pointers appreciated,
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.