]> git.pld-linux.org Git - packages/dokuwiki-plugin-data.git/blame - separate-rpmdb.patch
update patches
[packages/dokuwiki-plugin-data.git] / separate-rpmdb.patch
CommitLineData
ce3f39eb
ER
1Separate rpmdb data to rpmdb table, left join via %rpm% field name on demand.
2
3As the rpmdb data is huge comparing to other data, it's best we keep it
4in separate table, if it is still a performance problem, we could use
5separate datafile.
6
d3fe3298
ER
7You need to create 'rpm' table manually:
8CREATE TABLE rpmdb (eid INTEGER PRIMARY KEY, pid INTEGER, value);
9
10Handling it automatically would mean have to renumber upstream patches each
11time...
12
a4d4cd54
ER
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
15@@ -385,6 +385,7 @@
16 '%title%' => array('page', 'title'),
17 '%pageid%' => array('title', 'page'),
18 '%class%' => array('class'),
19+ '%rpm%' => array('rpm'),
20 '%lastmod%' => array('lastmod', 'timestamp')
21 );
22 if(isset($specials[$column['title']])) {
d3fe3298
ER
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
ce3f39eb
ER
25@@ -16,6 +16,7 @@
26 $lang['page'] = 'Page';
27 $lang['title'] = 'Page Name';
28 $lang['class'] = 'Page Class';
29+$lang['rpm'] = 'RPM Package';
d3fe3298 30 $lang['lastmod'] = 'Last Modified';
ce3f39eb
ER
31
32 $lang['name'] = 'Type Alias';
a4d4cd54
ER
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
35@@ -584,6 +584,13 @@
36 $select[] = 'pages.lastmod';
37 } elseif($key == '%title%') {
ce3f39eb 38 $select[] = "pages.page || '|' || pages.title";
a4d4cd54 39+ } elseif($key == '%rpm%'){
ce3f39eb
ER
40+ if(!isset($tables[$key])){
41+ $tables[$key] = 'T'.(++$cnt);
42+ $from .= ' LEFT JOIN rpmdb AS '.$tables[$key].' ON '.$tables[$key].'.pid = pages.pid';
43+ }
44+ $select[] = "group_concat(".$tables[$key].".value,'\n')";
45+
a4d4cd54
ER
46 } else {
47 if(!isset($tables[$key])) {
48 $tables[$key] = 'T' . (++$cnt);
This page took 0.028389 seconds and 4 git commands to generate.