1 Separate rpmdb data to rpmdb table, left join via %rpm% field name on demand.
3 As the rpmdb data is huge comparing to other data, it's best we keep it
4 in separate table, if it is still a performance problem, we could use
7 You need to create 'rpm' table manually:
8 CREATE TABLE rpmdb (eid INTEGER PRIMARY KEY, pid INTEGER, value);
10 Handling it automatically would mean have to renumber upstream patches each
13 #--- dokuwiki-plugin-data-20120227/db/latest.version~ 2012-02-27 16:32:51.000000000 +0200
14 #+++ dokuwiki-plugin-data-20120227/db/latest.version 2012-03-13 13:10:57.241251292 +0200
18 --- dokuwiki-plugin-data-20120227/helper.php~ 2012-03-13 13:10:04.000000000 +0200
19 +++ dokuwiki-plugin-data-20120227/helper.php 2012-03-13 13:11:33.742793083 +0200
21 static $specials = array('%title%' => array('page', 'title'),
22 '%pageid%' => array('title', 'page'),
23 '%class%' => array('class'),
24 + '%rpm%' => array('rpm'),
25 '%lastmod%' => array('lastmod','timestamp'));
26 if (isset($specials[$column['title']])) {
27 $s = $specials[$column['title']];
28 --- dokuwiki-plugin-data-20120227/lang/en/lang.php~ 2012-02-27 16:32:51.000000000 +0200
29 +++ dokuwiki-plugin-data-20120227/lang/en/lang.php 2012-03-13 13:12:04.190745746 +0200
31 $lang['page'] = 'Page';
32 $lang['title'] = 'Page Name';
33 $lang['class'] = 'Page Class';
34 +$lang['rpm'] = 'RPM Package';
35 $lang['lastmod'] = 'Last Modified';
37 $lang['name'] = 'Type Alias';
38 --- dokuwiki-plugin-data-20100608/syntax/table.php 2010-11-03 15:20:30.000000000 +0200
39 +++ dokuwiki-plugin-data-20100608/syntax/table.php 2010-12-01 19:50:59.217678000 +0200
41 $select[] = '" " || pages.class';
42 }elseif($key == '%title%'){
43 $select[] = "pages.page || '|' || pages.title";
44 + }elseif($key == '%rpm%'){
45 + if(!isset($tables[$key])){
46 + $tables[$key] = 'T'.(++$cnt);
47 + $from .= ' LEFT JOIN rpmdb AS '.$tables[$key].' ON '.$tables[$key].'.pid = pages.pid';
49 + $select[] = "group_concat(".$tables[$key].".value,'\n')";
52 if(!isset($tables[$key])){
53 $tables[$key] = 'T'.(++$cnt);