ApiRecordCommentRepository
final class ApiRecordCommentRepository implements RecordCommentRepositoryInterface (View source)
Record comment persistence for the API backend mode.
Uses PowerDNS REST API RRset comments as the sole storage backend. Comments are per-RRset (name + type), not per individual record. No database fallback - the API is the single source of truth.
Methods
Delete all comments for an RRset (domain_id, name, type).
Delete only legacy RRset comments (no per-record links).
Delete all comments for a domain.
Find a comment by RRset (domain_id, name, type).
Update an existing comment or create a new one.
Details
__construct(PowerdnsApiClient $apiClient, ZoneReadBackendInterface $backendProvider)
No description
RecordComment
add(RecordComment $comment)
Add a new comment to the database.
bool
delete(int $domainId, string $name, string $type)
Delete all comments for an RRset (domain_id, name, type).
bool
deleteLegacyComment(int $domainId, string $name, string $type)
Delete only legacy RRset comments (no per-record links).
void
deleteByDomainId(int $domainId)
Delete all comments for a domain.
RecordComment|null
find(int $domainId, string $name, string $type)
Find a comment by RRset (domain_id, name, type).
Returns the first matching comment.
RecordComment|null
update(int $domainId, string $oldName, string $oldType, RecordComment $comment)
Update an existing comment or create a new one.
RecordComment|null
addForRecord(int|string $recordId, RecordComment $comment)
Add a comment for a specific record.
Creates the comment and links it to the record.