summaryrefslogtreecommitdiff
path: root/gentoobrowse/views/newebuilds.xml
blob: de546c9d1e6e06ca2ec5c670ae9fd364a4e78847 (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
<?xml version="1.0"?>
<block xmlns:project2="http://project2.randomdan.homeip.net" xmlns:xi="http://www.w3.org/2001/XInclude">
	<project2:sqlrows name="newebuilds" datasource="postgres-web">
		<sql>
			SELECT description, moddate, p.name AS pkgname, c.name AS catname, e.version, e.firstseen sync,
				up.trackedsince IS NOT NULL AS tracked, p.packageid
			FROM ebuilds e, categories c, packages p LEFT OUTER JOIN user_packages up
				ON up.userid = <param name="userID" />
				AND up.packageid = p.packageid
			WHERE e.packageid = p.packageid
			AND p.categoryid = c.categoryid
			<filter name="syncCount">AND e.firstseen IN (
					SELECT DISTINCT e.firstseen
					FROM ebuilds e
					ORDER BY e.firstseen DESC
					LIMIT <param name="count" />)</filter>
			ORDER BY tracked DESC, e.firstseen, c.name, p.name, e.versioninst
		</sql>
	</project2:sqlrows>
	<project2:sqlrows name="syncs" datasource="postgres-web">
		<sql>
			SELECT DISTINCT e.firstseen AS synctime
			FROM ebuilds e
			ORDER BY e.firstseen DESC
			<filter name="syncCount"> LIMIT <param name="count" /></filter>
		</sql>
	</project2:sqlrows>
</block>