Passed
Push — master ( f21277...f08cc9 )
by Aimeos
04:50
created

PgSQL   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A compare() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Metaways Infosystems GmbH, 2011
6
 * @copyright Aimeos (aimeos.org), 2015-2018
7
 * @package MW
8
 * @subpackage Common
9
 */
10
11
12
namespace Aimeos\MW\Criteria;
13
14
15
/**
16
 * PostgreSQL search class
17
 *
18
 * @package MW
19
 * @subpackage Common
20
 */
21
class PgSQL extends \Aimeos\MW\Criteria\SQL
22
{
23
	/**
24
	 * Creates a new compare expression.
25
	 *
26
	 * Available comparision operators are:
27
	 * "==": item EQUAL value
28
	 * "!=": item NOT EQUAL value
29
	 * "~=": item LIKE value
30
	 * "=~": item STARTS WITH value
31
	 * ">=": item GREATER OR EQUAL value
32
	 * "<=": item SMALLER OR EQUAL value
33
	 * ">": item GREATER value
34
	 * "<": item SMALLER value
35
	 *
36
	 * @param string $operator One of the known operators
37
	 * @param string $name Name of the variable or column that should be used for comparison
38
	 * @param mixed $value Value the variable or column should be compared to
39
	 * @return \Aimeos\MW\Criteria\Expression\Compare\Iface Compare expression object
40
	 */
41
	public function compare( $operator, $name, $value )
42
	{
43
		return new \Aimeos\MW\Criteria\Expression\Compare\PgSQL( $this->getConnection(), $operator, $name, $value );
44
	}
45
}
46