Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql-joins.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-01-03 14:17:30 +0100
committerErich Eckner <git@eckner.net>2020-01-03 14:17:30 +0100
commitd235ae28781ae5c35b48b2ee462e6f1f9219d428 (patch)
treec72a9eebd6109f84abd2fff2a5f0112f0acdf5f5 /lib/mysql-joins.php
parentf6b5980ff60ec9402b3dfa0d65a9329754f04bcf (diff)
lib/mysql-joins.php: new joins with `compressions` table
Diffstat (limited to 'lib/mysql-joins.php')
-rw-r--r--lib/mysql-joins.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/mysql-joins.php b/lib/mysql-joins.php
index 751f1a0..561211d 100644
--- a/lib/mysql-joins.php
+++ b/lib/mysql-joins.php
@@ -248,6 +248,24 @@ function mysql_join_binary_packages_build_slaves ($table_left="", $table_right="
}
return $result;
}
+function mysql_join_binary_packages_compressions ($table_left="", $table_right="") {
+ $result = "";
+ $result .= ' JOIN `compressions`';
+ if (!empty($table_right)) {
+ $result .= ' AS `'.$table_right.'`';
+ }
+ if (!empty($table_left)) {
+ $result .= ' ON `'.$table_left.'`.`compression`=';
+ } else {
+ $result .= ' ON `binary_packages`.`compression`=';
+ }
+ if (!empty($table_right)) {
+ $result .= '`'.$table_right.'`.`id`';
+ } else {
+ $result .= '`compressions`.`id`';
+ }
+ return $result;
+}
function mysql_join_binary_packages_dependencies ($table_left="", $table_right="") {
$result = "";
$result .= ' JOIN `dependencies`';
@@ -590,6 +608,24 @@ function mysql_join_build_slaves_ssh_log ($table_left="", $table_right="") {
}
return $result;
}
+function mysql_join_compressions_binary_packages ($table_left="", $table_right="") {
+ $result = "";
+ $result .= ' JOIN `binary_packages`';
+ if (!empty($table_right)) {
+ $result .= ' AS `'.$table_right.'`';
+ }
+ if (!empty($table_left)) {
+ $result .= ' ON `'.$table_left.'`.`id`=';
+ } else {
+ $result .= ' ON `compressions`.`id`=';
+ }
+ if (!empty($table_right)) {
+ $result .= '`'.$table_right.'`.`compression`';
+ } else {
+ $result .= '`binary_packages`.`compression`';
+ }
+ return $result;
+}
function mysql_join_dependencies_binary_packages ($table_left="", $table_right="") {
$result = "";
$result .= ' JOIN `binary_packages`';