| @@ 63-72 (lines=10) @@ | ||
| 60 | * @param array $criteria |
|
| 61 | * @return array|bool |
|
| 62 | */ |
|
| 63 | public function executeDelete(EntityMetadata $metadata, Store $store, array $criteria) |
|
| 64 | { |
|
| 65 | $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria); |
|
| 66 | return $this->createQueryBuilder($metadata) |
|
| 67 | ->remove() |
|
| 68 | ->setQueryArray($criteria) |
|
| 69 | ->getQuery() |
|
| 70 | ->execute(); |
|
| 71 | ; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Finds records from the database based on the provided metadata and criteria. |
|
| @@ 128-138 (lines=11) @@ | ||
| 125 | * @param array $toUpdate The data to update. |
|
| 126 | * @return array|bool |
|
| 127 | */ |
|
| 128 | public function executeUpdate(EntityMetadata $metadata, Store $store, array $criteria, array $toUpdate) |
|
| 129 | { |
|
| 130 | $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria); |
|
| 131 | return $this->createQueryBuilder($metadata) |
|
| 132 | ->update() |
|
| 133 | ->setQueryArray($criteria) |
|
| 134 | ->setNewObj($toUpdate) |
|
| 135 | ->getQuery() |
|
| 136 | ->execute(); |
|
| 137 | ; |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * @return Formatter |
|