iceberg-cpp
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
iceberg::Expression Class Referenceabstract

Represents a boolean expression tree. More...

#include <expression.h>

Inheritance diagram for iceberg::Expression:
iceberg::util::Formattable iceberg::Aggregate< BoundTerm > iceberg::Aggregate< UnboundTerm< B > > iceberg::Predicate< BoundTerm > iceberg::Predicate< UnboundTerm< B > > iceberg::Aggregate< T > iceberg::And iceberg::False iceberg::Not iceberg::Or iceberg::Predicate< T > iceberg::True iceberg::UnboundAggregate iceberg::UnboundPredicate

Public Types

enum class  Operation {
  kTrue , kFalse , kIsNull , kNotNull ,
  kIsNan , kNotNan , kLt , kLtEq ,
  kGt , kGtEq , kEq , kNotEq ,
  kIn , kNotIn , kNot , kAnd ,
  kOr , kStartsWith , kNotStartsWith , kCount ,
  kCountNull , kCountStar , kMax , kMin
}
 Operation types for expressions.
 

Public Member Functions

virtual Operation op () const =0
 Returns the operation for an expression node.
 
virtual Result< std::shared_ptr< Expression > > Negate () const
 Returns the negation of this expression, equivalent to not(this).
 
virtual bool Equals (const Expression &other) const
 Returns whether this expression will accept the same values as another.
 
std::string ToString () const override
 Get a user-readable string representation.
 
virtual bool is_unbound_predicate () const
 
virtual bool is_bound_predicate () const
 
virtual bool is_unbound_aggregate () const
 
virtual bool is_bound_aggregate () const
 

Detailed Description

Represents a boolean expression tree.

Member Function Documentation

◆ Equals()

virtual bool iceberg::Expression::Equals ( const Expression other) const
inlinevirtual

Returns whether this expression will accept the same values as another.

Parameters
otheranother expression
Returns
true if the expressions are equivalent

Reimplemented in iceberg::True, iceberg::False, iceberg::And, iceberg::Or, iceberg::Not, iceberg::BoundUnaryPredicate, iceberg::BoundLiteralPredicate, and iceberg::BoundSetPredicate.

◆ Negate()

virtual Result< std::shared_ptr< Expression > > iceberg::Expression::Negate ( ) const
inlinevirtual

◆ op()

virtual Operation iceberg::Expression::op ( ) const
pure virtual

◆ ToString()

std::string iceberg::Expression::ToString ( ) const
inlineoverridevirtual

Get a user-readable string representation.

Implements iceberg::util::Formattable.

Reimplemented in iceberg::True, iceberg::False, iceberg::Or, iceberg::Not, and iceberg::UnboundPredicateImpl< B >.


The documentation for this class was generated from the following file: