Commit a952197c authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix like and not like operator

parent 2d10ddfa
Pipeline #1962 passed with stages
in 4 minutes and 14 seconds
...@@ -51,6 +51,6 @@ class Like extends Operator ...@@ -51,6 +51,6 @@ class Like extends Operator
*/ */
public function getExpression(): string public function getExpression(): string
{ {
return $this->expr->like($this->column, $this->expr->literal($this->value)); return $this->expr->like($this->column, $this->expr->literal('%' . $this->value . '%'));
} }
} }
...@@ -51,6 +51,6 @@ class NotLike extends Operator ...@@ -51,6 +51,6 @@ class NotLike extends Operator
*/ */
public function getExpression(): string public function getExpression(): string
{ {
return $this->expr->notLike($this->column, $this->expr->literal($this->value)); return $this->expr->notLike($this->column, $this->expr->literal('%' . $this->value . '%'));
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment