Skip to content

Commit

Permalink
Update devlog with latest tries.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewNaylor committed Oct 5, 2020
1 parent 64fe411 commit 50c552d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/devlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,22 @@ Screenshot for comparison, although the index I'm using is a few months old:
You can use this command to get names, versions, and ids all at once:
```sqlite
select distinct ids.id, manifest.id, versions.version, manifest.version, names.name, manifest.name from ids, manifest, versions, names where manifest.id = ids._rowid_ and manifest.version = versions._rowid_ and manifest.name = names._rowid_ order by ids.id;
```

## Update 10/5/2020

At this point, I'm trying to see if it's possible to get the latest version, and this code doesn't work even though it should. This is based on the code from https://www.sqlitetutorial.net/sqlite-window-functions/sqlite-last_value/#:~:text=The%20LAST_VALUE%20%28%29%20is%20a%20window%20function%20that,LAST_VALUE%20%28expression%29%20OVER%20%28%20PARTITION%20BY%20expression1%2C%20expression2%2C

```sqlite
SELECT DISTINCT
ids.id, manifest.id, versions.version, manifest.version, names.name, manifest.name,
LAST_VALUE ( manifest.version ) OVER (
ORDER BY ids.id
RANGE BETWEEN UNBOUNDED PRECEDING AND
UNBOUNDED FOLLOWING
) AS NewestVersion
FROM
ids, manifest, versions, names
WHERE
manifest.id = ids._rowid_ and manifest.version = versions._rowid_ and manifest.name = names._rowid_;
```

0 comments on commit 50c552d

Please sign in to comment.