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-20160311/helper.php~ 2016-11-22 23:06:06.000000000 +0200
14 +++ dokuwiki-plugin-data-20160311/helper.php 2016-11-22 23:06:44.267324645 +0200
16 '%title%' => array('page', 'title'),
17 '%pageid%' => array('title', 'page'),
18 '%class%' => array('class'),
19 + '%rpm%' => array('rpm'),
20 '%lastmod%' => array('lastmod', 'timestamp')
22 if(isset($specials[$column['title']])) {
23 --- dokuwiki-plugin-data-20120227/lang/en/lang.php~ 2012-02-27 16:32:51.000000000 +0200
24 +++ dokuwiki-plugin-data-20120227/lang/en/lang.php 2012-03-13 13:12:04.190745746 +0200
26 $lang['page'] = 'Page';
27 $lang['title'] = 'Page Name';
28 $lang['class'] = 'Page Class';
29 +$lang['rpm'] = 'RPM Package';
30 $lang['lastmod'] = 'Last Modified';
32 $lang['name'] = 'Type Alias';
33 --- dokuwiki-plugin-data-20160311/syntax/table.php~ 2016-07-01 14:27:21.000000000 +0300
34 +++ dokuwiki-plugin-data-20160311/syntax/table.php 2016-11-22 23:08:01.967907897 +0200
36 $select[] = 'pages.lastmod';
37 } elseif($key == '%title%') {
38 $select[] = "pages.page || '|' || pages.title";
39 + } elseif($key == '%rpm%'){
40 + if(!isset($tables[$key])){
41 + $tables[$key] = 'T'.(++$cnt);
42 + $from .= ' LEFT JOIN rpmdb AS '.$tables[$key].' ON '.$tables[$key].'.pid = pages.pid';
44 + $select[] = "group_concat(".$tables[$key].".value,'\n')";
47 if(!isset($tables[$key])) {
48 $tables[$key] = 'T' . (++$cnt);