|
@@ 137-148 (lines=12) @@
|
| 134 |
|
return $check && $check['cnt'] > 0; |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
protected function doInsert(Sql $sql, $path, $value, $context) |
| 138 |
|
{ |
| 139 |
|
$insert = $sql->insert(self::TABLE); |
| 140 |
|
$insert->values([ |
| 141 |
|
'path' => $path, |
| 142 |
|
'value' => $value, |
| 143 |
|
'context' => $context |
| 144 |
|
]); |
| 145 |
|
$insert = $insert->getSqlString($this->adapter->getPlatform()); |
| 146 |
|
|
| 147 |
|
$this->adapter->query($insert)->execute(); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
protected function doUpdate(Sql $sql, $path, $value, $context) |
| 151 |
|
{ |
|
@@ 150-159 (lines=10) @@
|
| 147 |
|
$this->adapter->query($insert)->execute(); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
protected function doUpdate(Sql $sql, $path, $value, $context) |
| 151 |
|
{ |
| 152 |
|
$update = $sql->update(self::TABLE); |
| 153 |
|
$update->set([ |
| 154 |
|
'value' => $value |
| 155 |
|
])->where(['path' => $path, 'context' => $context]); |
| 156 |
|
|
| 157 |
|
$update = $update->getSqlString($this->adapter->getPlatform()); |
| 158 |
|
$this->adapter->query($update)->execute(); |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
public function create() |
| 162 |
|
{ |