TemplateRecordLinkRepositoryInterface
interface TemplateRecordLinkRepositoryInterface (View source)
Tracks which zone records a template application wrote, so a later application of the same template can remove exactly those records.
SQL backends key the link on the numeric records.id; the API backend keys it on the encoded record identifier and keeps it in a separate table.
Methods
Link a record the template just wrote to the template.
Drop the link of one record, when the record itself is deleted.
Drop every link of a zone, on both id spaces, when the zone is deleted.
Delete the records a template application wrote to a zone, and their links.
Delete the apex SOA records of a zone so the template's SOA can replace them.
Links a template application wrote on the API backend.
Drop API backend links by their row ids.
Details
void
linkRecord(int $zoneId, int|string $recordId, int $templateId)
Link a record the template just wrote to the template.
void
unlinkRecord(int|string $recordId)
Drop the link of one record, when the record itself is deleted.
void
unlinkZone(int $zoneId)
Drop every link of a zone, on both id spaces, when the zone is deleted.
array
removeLinkedRecords(int $zoneId, int $templateId)
Delete the records a template application wrote to a zone, and their links.
SQL backends only: the records are removed from the PowerDNS table directly.
array
removeSoaRecords(int $zoneId)
Delete the apex SOA records of a zone so the template's SOA can replace them.
SQL backends only.
array
listEncodedLinks(int $zoneId, int $templateId)
Links a template application wrote on the API backend.
void
removeEncodedLinks(array $linkIds)
Drop API backend links by their row ids.