From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: GSoC: Adding a web interface similar to the Hydra web interface Date: Sun, 29 Jul 2018 16:41:27 +0200 Message-ID: <87sh42ayug.fsf@lassieur.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> <20180708230918.04aa76e0@scratchpost.org> <87tvoib69u.fsf@lassieur.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjmt3-00014C-Ga for guix-devel@gnu.org; Sun, 29 Jul 2018 10:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjmt0-0007qU-EC for guix-devel@gnu.org; Sun, 29 Jul 2018 10:41:33 -0400 Received: from mail.lassieur.org ([83.152.10.219]:60864) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fjmt0-0007pi-4X for guix-devel@gnu.org; Sun, 29 Jul 2018 10:41:30 -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: =?utf-8?Q?G=C3=A1bor?= Boskovits Cc: Guix-devel , Tatiana Sholokhova G=C3=A1bor Boskovits writes: > P > > Cl=C3=A9ment Lassieur ezt =C3=ADrta (id=C5=91pont:= 2018. j=C3=BAl. 29., > V 14:01): > >> Danny Milosavljevic writes: >> >> > 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 enti= re >> > 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 >> >> With the '<' operator, it doesn't give the results we are looking for, I >> think. >> >> For example: >> >> select (0,1) < (1,0); -- returns 1 >> select (0,0) < (0,1); -- returns 1 >> > > This is working as expected. Actually this: > (a,b)<(c,d) is a shortcut for a > In both cases, we'd want it to return 0. >> > > How do we use it? Why this is the expected result? > > >> I think we should use: >> >> select (0 < 1) and (1 < 0); -- returns 0 >> select (0 < 0) and (0 < 1); -- returns 0 >> > > Could you please clarify which numbers are the placeholders for which > quantities? > >> >> instead, for the pagination borders code. Actually, forget what I said, I was wrong ;-)