Skip Menu |

This queue is for tickets about the Dancer-Plugin-Database-Core CPAN distribution.

Report information
The Basics
Id: 114700
Status: resolved
Priority: 0/
Queue: Dancer-Plugin-Database-Core

People
Owner: Nobody in particular
Requestors: dean [...] fragfest.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Question; OR parameters in the query hashref
A quick question, is there a way to have the paramaters in the query hashref OR'd rather than AND'd ? Thanks
On 2016-05-25 13:42:31, djzort wrote: Show quoted text
> A quick question, is there a way to have the paramaters in the query > hashref OR'd rather than AND'd ?
Sorry for the slow reply. Currently, no, there isn't; the convenience features are designed for typical quick lookup types, e.g. fetching a record by ID etc. You can pass an arrayref if you want to know if a field's value is one of a set of values, but you can't currently use it to generate e.g. "IF foo = 'one' OR bar = 'two'". At some point, I may look at the feasibility of replacing that custom SQL generation code with the use of SQL::Abstract or something instead, which would be more flexible, at the cost of an extra dependency. So, for now, the answer is mostly no. I'll mark the ticket as closed, as the question has (finally!) been answered.