Class ViewExpression


  • public class ViewExpression
    extends Object
    An abstraction that represents a stream of values that can be represented as tuple-encoding keys and binary values in FoundationDB.

    Visually, a view expression is quite similar to a query in a declarative language like SQL. A view expression is composed of several clauses, including:

    • A root Source, which defines the stream of values from which the expression's Elements are generated.
    • A projection, which is a collection of Elements that generate values.
    • A sort order, which is an ordered list of Elements that define the order of the stream. By definition, the sort order is the lexicographic order of the elements when packed together as tuple.
    • A predicate, in the form of a QueryPredicate

    Because view expressions are quite general but are closely tied to the semantics of the tuple layer, they are very useful for planning tasks such as incremental index selection. To see how an index is represented as a view expression, see fromIndexDefinition(String, Collection, KeyExpression).