← All changes
|
backend/src/Repository/Field/FieldRepositoryInterface.php
+34
-0
0.2
→
1.5.1
View file →
| @@ -18,5 +18,39 @@ | ||
| 18 | 18 | * |
| 19 | 19 | * @return mixed[]|null The array of entities |
| 20 | 20 | */ |
| 21 | 21 | public function getFieldsById(int $id): ?array; |
| 22 | + | |
| 23 | + /** | |
| 24 | + * Get multiple fields by their IDs in a single query. | |
| 25 | + * | |
| 26 | + * @param int[] $fieldIds | |
| 27 | + * @return array<int, object> Indexed by field ID | |
| 28 | + */ | |
| 29 | + public function getFieldsByIds(array $fieldIds): array; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * Delete multiple fields by their IDs in a single query. | |
| 33 | + * | |
| 34 | + * @param int[] $ids | |
| 35 | + * @return int Number of deleted rows | |
| 36 | + */ | |
| 37 | + public function deleteMany(array $ids): int; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * Delete multiple fields by foreign key values (formId). | |
| 41 | + * | |
| 42 | + * @param array<int> $formIds | |
| 43 | + * @param string $foreignColumn | |
| 44 | + * @return int Number of deleted fields | |
| 45 | + */ | |
| 46 | + public function deleteManyByForeignKeyValues(array $formIds, string $foreignColumn = 'formId'): int; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * Delete fields by a single foreign key value (formId). | |
| 50 | + * | |
| 51 | + * @param int $formId | |
| 52 | + * @param string $foreignColumn | |
| 53 | + * @return int Number of deleted fields | |
| 54 | + */ | |
| 55 | + public function deleteOneByForeignKeyValue(int $formId, string $foreignColumn = 'formId'): int; | |
| 22 | 56 | } |