Skip to content

Commit f3a4c23

Browse files
authored
Merge pull request #421 from abetwothree/patch-1
Support for full text search
2 parents 464f119 + b25f757 commit f3a4c23

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/CacheKey.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ protected function getOtherClauses(array $where) : string
177177
$value = $this->getTypeClause($where);
178178
$value .= $this->getValuesClause($where);
179179

180-
return "-{$where["column"]}_{$value}";
180+
$column = "";
181+
$column .= isset($where["column"]) ? $where["column"] : "";
182+
$column .= isset($where["columns"]) ? implode("-", $where["columns"]) : "";
183+
184+
return "-{$column}_{$value}";
181185
}
182186

183187
protected function getQueryColumns(array $columns) : string
@@ -231,7 +235,7 @@ protected function getTableSlug() : string
231235

232236
protected function getTypeClause($where) : string
233237
{
234-
$type = in_array($where["type"], ["InRaw", "In", "NotIn", "Null", "NotNull", "between", "NotInSub", "InSub", "JsonContains"])
238+
$type = in_array($where["type"], ["InRaw", "In", "NotIn", "Null", "NotNull", "between", "NotInSub", "InSub", "JsonContains", "Fulltext"])
235239
? strtolower($where["type"])
236240
: strtolower($where["operator"]);
237241

0 commit comments

Comments
 (0)