From: Jelle Licht <jlicht@fsfe.org>
To: Tatiana Sholokhova <tanja201396@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: GSoC: Adding a web interface similar to the Hydra web interface
Date: Wed, 4 Jul 2018 23:47:14 +0200 [thread overview]
Message-ID: <CAPsKtf+ejO3FFjA5UT7dOPqnN3d874-B2-wEZFDeAqdnxPSrzQ@mail.gmail.com> (raw)
In-Reply-To: <CAMSS15Dn3Ygy85=sxJ+g1Lt=y=Db7uQpPevxELD-Z1Z5_SipoQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2237 bytes --]
2018-07-04 22:54 GMT+02:00 Tatiana Sholokhova <tanja201396@gmail.com>:
> Hi all,
>
>
Hi Tatiana,
> I just committed the code I wrote trying to improve pagination. I screwed
> up a bit with the new pagination.
> The problem I encountered is following. If we want to maintain a link to
> the previous page we have to filter the database table entries with to
> types of filters: one with lower bound on the id, and the other with the
> upper bound. As we do so simultaneously with limiting the query output to
> the maximal page size, we need to change the ordering type depending on the
> type of the filter. At the moment I am not sure, what it the best way to
> implement database query with such properties. Could you please take a look
> on the commit and share your ideas on that?
>
> The current implementation of pagination works correctly but it does not
> support link to the previous page (first, and next only).
>
It has been some time since I last had a look at databases, so you have my
apologies
in advance if what I am saying does not really apply, or is even not
entirely correct.
You could perhaps have a look at reversing the sort order, and replace ">"
with "<" and "<"
with "<" in your WHERE clauses. The query to the previous page would be
similar to
retrieving the next page, but basically reversing the order you would page
through the results,
if that makes any sense.
If this works, you could also hack together a maybe-efficient query to
retrieve the items
for the last page; simply insert the maximum possible value in your query,
and retrieve the
previous page with regards to that maximum value. In the current case, you
could enter the
highest possible value any id can have.
If it is possible for new items to show up on previous pages as well (so
with id's that are lower
than the highest id), you would need to replace your sorting and filtering
to act on a composite
value of e.g. <id, timestamp>, instead of on only the id value.
>
> I have been trying to improve pagination for a while, and I now am
> thinking about starting the parallel work on the implementation of the
> features we listed before. What do you think about it?
>
> Best regards,
> Tatiana
>
> Good luck, and HTH!
- Jelle
[-- Attachment #2: Type: text/html, Size: 3531 bytes --]
next prev parent reply other threads:[~2018-07-04 21:47 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 15:44 GSoC: Adding a web interface similar to the Hydra web interface Tatiana Sholokhova
2018-05-04 2:01 ` Maxim Cournoyer
2018-05-04 12:55 ` Ludovic Courtès
2018-05-05 10:50 ` Ricardo Wurmus
2018-05-08 7:26 ` Danny Milosavljevic
2018-05-09 9:56 ` Ricardo Wurmus
2018-05-09 17:21 ` Ricardo Wurmus
2018-05-13 18:45 ` Tatiana Sholokhova
2018-05-13 19:30 ` Gábor Boskovits
2018-05-13 19:33 ` Tonton
2018-05-13 19:54 ` Danny Milosavljevic
2018-05-14 3:34 ` Chris Marusich
2018-05-14 4:20 ` Ricardo Wurmus
2018-05-17 22:31 ` Tatiana Sholokhova
2018-05-18 20:35 ` Ricardo Wurmus
2018-05-21 21:52 ` Tatiana Sholokhova
2018-05-22 5:33 ` Ricardo Wurmus
2018-05-23 21:06 ` Tatiana Sholokhova
2018-05-24 6:03 ` Ricardo Wurmus
[not found] ` <CAMSS15DThnLO+YEVaBmJ9ozMeu4mO1rHAdXHgZ8K+Csu40pORQ@mail.gmail.com>
2018-05-28 10:39 ` Ricardo Wurmus
2018-06-02 15:03 ` Ricardo Wurmus
2018-06-03 15:50 ` Tatiana Sholokhova
2018-06-03 19:40 ` Ricardo Wurmus
2018-06-04 22:14 ` Tatiana Sholokhova
2018-06-05 20:40 ` Ricardo Wurmus
2018-06-06 18:02 ` Danny Milosavljevic
2018-06-10 14:36 ` Tatiana Sholokhova
2018-06-11 10:19 ` Ricardo Wurmus
2018-06-11 11:23 ` Ludovic Courtès
2018-06-12 16:35 ` Danny Milosavljevic
2018-06-12 21:52 ` Ricardo Wurmus
2018-06-12 22:43 ` Tatiana Sholokhova
2018-06-13 6:39 ` Gábor Boskovits
2018-06-13 8:27 ` Danny Milosavljevic
2018-06-13 13:58 ` Joshua Branson
2018-06-13 14:22 ` Gábor Boskovits
2018-06-13 15:07 ` Joshua Branson
2018-06-25 10:46 ` Gábor Boskovits
2018-06-25 12:12 ` Tatiana Sholokhova
2018-06-27 19:56 ` Ludovic Courtès
2018-07-04 20:54 ` Tatiana Sholokhova
2018-07-04 21:47 ` Jelle Licht [this message]
2018-07-05 8:27 ` Danny Milosavljevic
2018-07-06 9:58 ` Gábor Boskovits
2018-07-08 19:48 ` Tatiana Sholokhova
2018-07-08 21:09 ` Danny Milosavljevic
2018-07-29 12:01 ` Clément Lassieur
2018-07-29 13:25 ` Gábor Boskovits
2018-07-29 14:41 ` Clément Lassieur
2018-07-08 21:19 ` Gábor Boskovits
2018-07-18 10:37 ` Clément Lassieur
2018-07-19 20:10 ` Tatiana Sholokhova
2018-07-19 21:47 ` Amirouche Boubekki
2018-07-18 10:19 ` Clément Lassieur
2018-07-17 19:31 ` Clément Lassieur
2018-05-29 16:07 ` Ludovic Courtès
2018-05-29 16:17 ` Gábor Boskovits
2018-07-18 9:34 ` Clément Lassieur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPsKtf+ejO3FFjA5UT7dOPqnN3d874-B2-wEZFDeAqdnxPSrzQ@mail.gmail.com \
--to=jlicht@fsfe.org \
--cc=guix-devel@gnu.org \
--cc=tanja201396@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).