summaryrefslogtreecommitdiff
path: root/gentoobrowse/views/newebuilds.xml
blob: 92d5fbd5e411375783ebf842b0545f2156b477a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0"?>
<block xmlns:project2="http://project2.randomdan.homeip.net" xmlns:xi="http://www.w3.org/2001/XInclude">
	<xi:include href="../datasources/postgres-web.xml" />
	<project2:sqlview name="newebuilds" recordname="ebuild" datasource="postgres-web">
		<sql>
			SELECT filename, description, moddate, p.name AS pkgname, c.name AS catname, f.firstseen sync,
				up.trackedsince IS NOT NULL AS tracked
			FROM ebuilds e, files f, categories c, packages p LEFT OUTER JOIN user_packages up
				ON up.userid = ?
				AND up.packageid = p.packageid
			WHERE e.ebuildid = f.fileid
			AND e.packageid = p.packageid
			AND p.categoryid = c.categoryid
			AND f.firstseen IN (
					SELECT DISTINCT f.firstseen
					FROM files f
					WHERE f.filetypeid = 1
					ORDER BY f.firstseen
					DESC LIMIT 3)
			ORDER BY tracked DESC, c.name, p.name, e.versioninst
		</sql>
		<parameters>
			<param bind="0" value="%loggedInUserID|0" />
		</parameters>
	</project2:sqlview>
	<project2:sqlview name="syncs" recordname="sync" datasource="postgres-web">
		<sql>
			SELECT DISTINCT f.firstseen AS synctime
			FROM files f
			WHERE filetypeid = 1
			ORDER BY f.firstseen
			DESC LIMIT 3
		</sql>
	</project2:sqlview>
</block>