Re: Feature request: more flexible database lookups

From: John Massai <massaijohn_at_gmail.com>
Date: Tue, 6 Oct 2015 12:55:45 -0700

On 10/6/15, Murray S. Kucherawy <msk_at_blackops.org> wrote:
> On Mon, 5 Oct 2015, John Massai wrote:
>>>> But for some reason, the filter variable isn't working on SigningTable
>>>> as mentioned by myself (EPEL) and him (Debian). I don't know if that
>>>> bug is fixed yet or not, but seems to have been around for a long
>>>> time.
>>>>
>>>> Regardless, I am not trying to solve anything, I am asking for a bug
>>>> fix (above) at least and a feature enhancement (more direct query
>>>> control) would be better.
>
> I tried the filter code just now (basically a 2.10.3 build from trunk) and
> it seemed to work for me, or at least it constructed an SQL query as I
> would expect. In particular, using this DSN specification:
>
>
> dsn:mysql://opendkim:PWDHERE_at_localhost/opendkim/table=signingtable?keycol=addr?datacol=keyname?filter=ID=0
>
> and then a query for "foo", it generated this SQL:
>
> SELECT keyname FROM signingtable WHERE addr = 'foo' AND ID=0
>
> ...which is what I would expect. What were you trying that wasn't
> working?

Simple test I tried:

?filter="private_key <> ''"
?filter=private_key <> ''

The person who asked last year (
http://lists.opendkim.org/archive/opendkim/users/2014/06/3201.html )
was trying this:

?filter='`private_key` NOT LIKE ""'

So maybe it's the spaces? The quotes?
Received on Tue Oct 06 2015 - 19:55:59 PST

This archive was generated by hypermail 2.3.0 : Tue Oct 06 2015 - 20:00:02 PST