Code Duplication    Length = 7-7 lines in 4 locations

includes/db/DatabaseOracle.php 1 location

@@ 1483-1489 (lines=7) @@
1480
		return $this->mServer;
1481
	}
1482
1483
	public function buildGroupConcatField(
1484
		$delim, $table, $field, $conds = '', $join_conds = []
1485
	) {
1486
		$fld = "LISTAGG($field," . $this->addQuotes( $delim ) . ") WITHIN GROUP (ORDER BY $field)";
1487
1488
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
1489
	}
1490
1491
	/**
1492
	 * @param string $field Field or column to cast

includes/libs/rdbms/database/Database.php 1 location

@@ 1664-1670 (lines=7) @@
1661
		return 'CONCAT(' . implode( ',', $stringList ) . ')';
1662
	}
1663
1664
	public function buildGroupConcatField(
1665
		$delim, $table, $field, $conds = '', $join_conds = []
1666
	) {
1667
		$fld = "GROUP_CONCAT($field SEPARATOR " . $this->addQuotes( $delim ) . ')';
1668
1669
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
1670
	}
1671
1672
	public function buildStringCast( $field ) {
1673
		return $field;

includes/libs/rdbms/database/DatabasePostgres.php 1 location

@@ 1282-1288 (lines=7) @@
1279
		return implode( ' || ', $stringList );
1280
	}
1281
1282
	public function buildGroupConcatField(
1283
		$delimiter, $table, $field, $conds = '', $options = [], $join_conds = []
1284
	) {
1285
		$fld = "array_to_string(array_agg($field)," . $this->addQuotes( $delimiter ) . ')';
1286
1287
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
1288
	}
1289
1290
	public function buildStringCast( $field ) {
1291
		return $field . '::text';

includes/libs/rdbms/database/DatabaseSqlite.php 1 location

@@ 918-924 (lines=7) @@
915
		return '(' . implode( ') || (', $stringList ) . ')';
916
	}
917
918
	public function buildGroupConcatField(
919
		$delim, $table, $field, $conds = '', $join_conds = []
920
	) {
921
		$fld = "group_concat($field," . $this->addQuotes( $delim ) . ')';
922
923
		return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
924
	}
925
926
	/**
927
	 * @param string $oldName