accept

Adds a new Node into the current node.

This method is considered unsafe as it allows inserting arbitrary nodes into the current node. Since KtMongo is a database driver, this method allows inserting any kind of operation without checking any security or coherence invariants.

If you are not careful, this method will create database injection risks.

Users should only interact with this method when they have a custom node that doesn't exist in the library, for example, when adding a missing operator. In these cases, we highly recommend users to contact the maintainers of KtMongo to ensure the created operator respects all invariants. If possible, upstreaming the operator would be of benefit to all users and guarantees future bug fixes.

In all other cases, it is expected that implementations of this interface provide methods for each added functionality that are responsible for checking invariants and are safe to call.

For a more detailed explanation of the contract of this method, see Node.

Implementation notes