Have SQLite sort our sidebar tables #1

Closed
opened 2021-10-04 07:53:50 -04:00 by anna · 1 comment
Owner

Rather than sorting through GTK, we can use the SQL "ORDER BY" statement to sort our sidebar list inside the database engine.

Rather than sorting through GTK, we can use the SQL "ORDER BY" statement to sort our sidebar list inside the database engine.
anna added this to the Emmental 2.6 milestone 2021-10-07 11:06:12 -04:00
Author
Owner

We can find the position of a playlist inside the sorted list through:

sqlite> SELECT * FROM
			(SELECT rowid,name,ROW_NUMBER()
             OVER (ORDER BY lower(name))
             FROM artists)
        WHERE rowid=3;
3|BArtist|2

We can find the position of a playlist inside the sorted list through: ``` sqlite> SELECT * FROM (SELECT rowid,name,ROW_NUMBER() OVER (ORDER BY lower(name)) FROM artists) WHERE rowid=3; 3|BArtist|2 ```
anna referenced this issue from a commit 2021-10-11 11:53:25 -04:00
anna referenced this issue from a commit 2021-10-11 11:53:25 -04:00
anna closed this issue 2021-10-11 11:53:48 -04:00
anna referenced this issue from a commit 2021-10-11 11:58:48 -04:00
anna referenced this issue from a commit 2021-10-11 11:58:48 -04:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: anna/emmental#1
No description provided.