Code Duplication    Length = 7-7 lines in 4 locations

includes/db/DatabaseSqlite.php 1 location

@@ 944-950 (lines=7) @@
941
		return '(' . implode( ') || (', $stringList ) . ')';
942
	}
943
944
	public function buildGroupConcatField(
945
		$delim, $table, $field, $conds = '', $join_conds = []
946
	) {
947
		$fld = "group_concat($field," . $this->addQuotes( $delim ) . ')';
948
949
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
950
	}
951
952
	/**
953
	 * @throws MWException

includes/db/Database.php 1 location

@@ 1813-1819 (lines=7) @@
1810
		return 'CONCAT(' . implode( ',', $stringList ) . ')';
1811
	}
1812
1813
	public function buildGroupConcatField(
1814
		$delim, $table, $field, $conds = '', $join_conds = []
1815
	) {
1816
		$fld = "GROUP_CONCAT($field SEPARATOR " . $this->addQuotes( $delim ) . ')';
1817
1818
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
1819
	}
1820
1821
	/**
1822
	 * @param string $field Field or column to cast

includes/db/DatabaseOracle.php 1 location

@@ 1557-1563 (lines=7) @@
1554
		return $this->mServer;
1555
	}
1556
1557
	public function buildGroupConcatField(
1558
		$delim, $table, $field, $conds = '', $join_conds = []
1559
	) {
1560
		$fld = "LISTAGG($field," . $this->addQuotes( $delim ) . ") WITHIN GROUP (ORDER BY $field)";
1561
1562
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
1563
	}
1564
1565
	/**
1566
	 * @param string $field Field or column to cast

includes/db/DatabasePostgres.php 1 location

@@ 1531-1537 (lines=7) @@
1528
		return implode( ' || ', $stringList );
1529
	}
1530
1531
	public function buildGroupConcatField(
1532
		$delimiter, $table, $field, $conds = '', $options = [], $join_conds = []
1533
	) {
1534
		$fld = "array_to_string(array_agg($field)," . $this->addQuotes( $delimiter ) . ')';
1535
1536
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
1537
	}
1538
1539
	/**
1540
	 * @param string $field Field or column to cast