]> git.pld-linux.org Git - packages/dokuwiki-plugin-data.git/blame - separate-rpmdb.patch
up to 2016-03-11
[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
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
15#@@ -1 +1 @@
16#-5
17#+6
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
20@@ -184,6 +184,7 @@
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'));
ce3f39eb
ER
26 if (isset($specials[$column['title']])) {
27 $s = $specials[$column['title']];
d3fe3298
ER
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
ce3f39eb
ER
30@@ -16,6 +16,7 @@
31 $lang['page'] = 'Page';
32 $lang['title'] = 'Page Name';
33 $lang['class'] = 'Page Class';
34+$lang['rpm'] = 'RPM Package';
d3fe3298 35 $lang['lastmod'] = 'Last Modified';
ce3f39eb
ER
36
37 $lang['name'] = 'Type Alias';
ce3f39eb
ER
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
40@@ -328,6 +328,13 @@
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';
48+ }
49+ $select[] = "group_concat(".$tables[$key].".value,'\n')";
50+
51 }else{
52 if(!isset($tables[$key])){
53 $tables[$key] = 'T'.(++$cnt);
This page took 0.100205 seconds and 4 git commands to generate.