must be added to the zone. ``rrset`` can be empty in which case the
method is used to remove a RRset.
-DNS update support
-------------------
-
-To make your backend DNS update compatible, it needs to implement a
-number of new functions and functions already used for slave-operation.
-The new functions are not DNS update specific and might be used for
-other update/remove functionality at a later stage.
-
-.. code-block:: cpp
-
- class DNSBackend {
- public:
- /* ... */
- virtual bool startTransaction(const string &qname, int id);
- virtual bool commitTransaction();
- virtual bool abortTransaction();
- virtual bool feedRecord(const DNSResourceRecord &rr, string *ordername);
- virtual bool replaceRRSet(uint32_t domain_id, const string& qname, const QType& qt, const vector<DNSResourceRecord>& rrset);
- virtual bool listSubZone(const string &zone, int domain_id);
- /* ... */
- }
-
-.. cpp:function:: virtual bool DNSBackend::startTransaction(const string &qname, int id)
-
- See :ref:`rw-slave`. Please note that this
- function now receives a negative number (-1), which indicates that the
- current zone data should NOT be deleted.
-
-.. cpp:function:: virtual bool DNSBackend::commitTransaction()
-
- See :ref:`rw-slave`.
-
-.. cpp:function:: virtual bool DNSBackend::abortTransaction()
-
- See :ref:`rw-slave`. Method is called when an exception is received.
-
-.. cpp:function:: virtual bool DNSBackend::feedRecord(const DNSResourceRecord &rr, string *ordername)
-
- See :ref:`rw-slave`. Please keep in mind
- that the zone is not empty because :func:`DNSBackend::startTransaction` was called
- different.
-
-.. cpp:function:: virtual bool DNSBackend::listSubZone(const string &name, int domain_id)
-
- This method is needed for rectification of a zone after NS-records
- have been added. For DNSSEC, we need to know which records are below
- the currently added record. ``listSubZone()`` is used like ``list()``
- which means PowerDNS will call ``get()`` after this method. The
- default SQL query looks something like this::
-
- // First %s is 'sub.zone.com', second %s is '*.sub.zone.com'
- select content,ttl,prio,type,domain_id,name from records where (name='%s' OR name like '%s') and domain_id=%d
-
- The method is not only used when adding records, but also to correct
- ENT-records in powerdns. Make sure it returns every record in the tree
- below the given record.
-
-.. cpp:function:: virtual bool DNSBackend::replaceRRSet(uint32_t domain_id, const string& qname, const QType& qt, const vector<DNSResourceRecord>& rrset)
-
- This method should remove all the records with ``qname`` of type ``qt``.
- ``qt`` might also be ANY, which means all the records with that
- ``qname`` need to be removed. After removal, the records in ``rrset``
- must be added to the zone. ``rrset`` can be empty in which case the
- method is used to remove a RRset.
-
Miscellaneous
-------------