[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSoC: Adding a web interface similar to the Hydra web interface
From: |
Danny Milosavljevic |
Subject: |
Re: GSoC: Adding a web interface similar to the Hydra web interface |
Date: |
Sun, 8 Jul 2018 23:09:18 +0200 |
Hi Tatiana,
On Sun, 8 Jul 2018 21:48:32 +0200
Tatiana Sholokhova <address@hidden> wrote:
> Do you have ideas on how to
> implement tuple comparison and other routines in SQL and guile in a
> convenient and flexible way?
sqlite3 supports row values, so the comparison can be
written like this:
select * from foo where (a,b,c) = (2,'foo',3);
It even supports NULLs for wildcards, though it's a little more complicated:
select * from foo where coalesce((a,b,c) = (2,NULL,3), 1) = 1;
The sqlite C interface doesn't support parameter bindings for the entire
row, though, so you'd have to specify 3 values.
This works:
(sqlite-exec db "select * from foo where (a,b,c) = (" 2 "," "foo" "," 3 ");")
but this doesn't work, unfortunately:
(sqlite-exec db "select * from foo where (a,b,c) = " '(2 "foo" 3) ";")
See also https://www.sqlite.org/rowvalue.html
pgpg44Gtmxm9A.pgp
Description: OpenPGP digital signature
- Re: GSoC: Adding a web interface similar to the Hydra web interface, Tatiana Sholokhova, 2018/07/04
- Re: GSoC: Adding a web interface similar to the Hydra web interface, Gábor Boskovits, 2018/07/08
- Re: GSoC: Adding a web interface similar to the Hydra web interface, Clément Lassieur, 2018/07/18
- Re: GSoC: Adding a web interface similar to the Hydra web interface, Tatiana Sholokhova, 2018/07/19
- Re: GSoC: Adding a web interface similar to the Hydra web interface, Amirouche Boubekki, 2018/07/19