From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <20180708230918.04aa76e0@scratchpost.org> References: <87in78hxo2.fsf@elephly.net> <878t7xb58o.fsf@elephly.net> <874lijbqvf.fsf@elephly.net> <20180606200210.7a9c4dd6@scratchpost.org> <20180612183504.2621cefa@scratchpost.org> <8736xrd64y.fsf@elephly.net> <8736x8ype9.fsf@gnu.org> <20180705102753.6bc57971@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/hhoCPo89L1Q=Lr_RhmqIGom"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcGw4-0000Vk-4I for guix-devel@gnu.org; Sun, 08 Jul 2018 17:09:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcGw0-0000cK-VK for guix-devel@gnu.org; Sun, 08 Jul 2018 17:09:36 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:33812) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fcGw0-0000W7-Of for guix-devel@gnu.org; Sun, 08 Jul 2018 17:09:32 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tatiana Sholokhova Cc: guix-devel --Sig_/hhoCPo89L1Q=Lr_RhmqIGom Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Tatiana, On Sun, 8 Jul 2018 21:48:32 +0200 Tatiana Sholokhova 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) =3D (2,'foo',3); It even supports NULLs for wildcards, though it's a little more complicated: select * from foo where coalesce((a,b,c) =3D (2,NULL,3), 1) =3D 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) =3D (" 2 "," "foo" "," 3= ");") but this doesn't work, unfortunately: (sqlite-exec db "select * from foo where (a,b,c) =3D " '(2 "foo" 3) ";") See also https://www.sqlite.org/rowvalue.html --Sig_/hhoCPo89L1Q=Lr_RhmqIGom Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAltCfX8ACgkQ5xo1VCww uqW5WAf/Vll50oGhxtcrsYPjW6ONIdRA+FufTB2d0m03DZfg/bQlUxY6HAnir/k9 kO9eIthfT1hswvNdkvj77ygJcac7+/1HuXZSxkSfsnyqHRycmYYtoyQY3/ATGtc/ ZHdTkg2pPY1LDOpluIww3HyQl9uS9LaiqfSJ63uFlcMGNk+IRXbUNPKuSveUc/xd AxCeVQM3bpsIY+8zpbptTd3fn7FFXVpyjvGdTd/aEUe4JEfdEYt3QJSW3ZIHJPug qHkOV9RLFNJhxLEHo9Ko89A/CJbfVzVn/mc2sAtg8QZCN9nq+HZ4xWgHfYXybcDT QET/iufzc0aty+KfMWg2gDkT+duvVA== =rBUN -----END PGP SIGNATURE----- --Sig_/hhoCPo89L1Q=Lr_RhmqIGom--