This commit is contained in:
2020-08-31 12:38:32 +08:00
parent 683a39dded
commit 65c443ec87
126 changed files with 7369 additions and 228 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace Database\Condition;
/**
* Class HashCondition
* @package Yoc\db\condition
*/
class HashCondition extends Condition
{
/**
* @return string
*/
public function builder()
{
$array = [];
if (empty($this->value)) {
return '';
}
foreach ($this->value as $key => $value) {
if ($value === null) {
continue;
}
$array[] = $this->resolve($key, $value);
}
return implode(' AND ', $array);
}
}