Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.tree

Package-level declarations

Helpers to represent trees of data built bottom-up. Nodes become immutable when they become branches of another tree, and offer utilities for debugging (e.g. JSON representation in their toString implementation).

Users of the library are not expected to interact with this package in day-to-day operations.

However, contributors to the library, and users wanting to implement custom operators, should familiarize themselves with this package.

Types

AbstractBsonNode

abstract class AbstractBsonNode : Node, BsonNode

Utility implementation for BsonNode, which handles the context, toString representation and freezing.

AbstractCompoundBsonNode

Abstract utility class to help implement CompoundBsonNode.

BsonNode

interface BsonNode : Node

A node in the BSON AST.

CompoundBsonNode

A compound expression is an BsonNode that may have children.

CompoundNode

interface CompoundNode<N : Node>

A Node that combines multiple other nodes into a single node.

Node

interface Node

An element in an abstract tree.

Functions

acceptAll

fun <N : Node> CompoundNode<N>.acceptAll(nodes: Iterable<N>)

Adds any number of nodes into this one.