Fluent classes representing expressions

Leaf classes

class deephaven::client::highlevel::NumericExpression : public deephaven::client::highlevel::Expression

Subclassed by deephaven::client::highlevel::NumCol

Public Functions

explicit NumericExpression(std::shared_ptr<impl::NumericExpressionImpl> impl)

Constructor. Used internally.

NumericExpression(int value)

Implicit conversion from int.

Parameters

value – The value

NumericExpression(long value)

Implicit conversion from long.

Parameters

value – The value

NumericExpression(float value)

Implicit conversion from float.

Parameters

value – The value

NumericExpression(double value)

Implicit conversion from double.

Parameters

value – The value

NumericExpression(NumericExpression&&) = default

Move constructor.

NumericExpression &operator=(NumericExpression&&) = default

Move assignment operator.

~NumericExpression() override

Destructor.

Friends

friend friend NumericExpression operator+ (const NumericExpression &item)

Unary operator +. This is effectively a no-op.

Parameters

item – The incoming NumericExpression

Returns

A NumericExpression representing the same item.

friend friend NumericExpression operator- (const NumericExpression &item)

Unary operator -

Parameters

item – The incoming NumericExpression

Returns

The NumericExpression representing the negation of item

friend friend NumericExpression operator~ (const NumericExpression &item)

Unary operator ~

Parameters

item – The incoming NumericExpression

Returns

The NumericExpression representing the complement of item

friend friend NumericExpression operator+ (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator +

Parameters
Returns

The NumericExpression representing the sum lhs + rhs

friend friend NumericExpression operator- (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator -

Parameters
Returns

The NumericExpression representing the difference lhs - rhs

friend friend NumericExpression operator* (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator *

Parameters
Returns

The NumericExpression representing the product lhs * rhs

friend friend NumericExpression operator/ (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator /

Parameters
Returns

The NumericExpression representing the division lhs / rhs

friend friend NumericExpression operator% (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator %

Parameters
  • lhs – A NumericExpression representing the left-hand side of the modulus operation

  • rhs – A NumericExpression representing the right-hand side of the modulus operation

Returns

The NumericExpression representing the operation lhs % rhs

friend friend NumericExpression operator^ (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator ^

Parameters
Returns

The NumericExpression representing the exclusive-or operation lhs ^ rhs

friend friend NumericExpression operator| (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator |

Parameters
Returns

The NumericExpression representing the bitwise-or operation lhs | rhs

friend friend NumericExpression operator & (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator &

Parameters
Returns

The NumericExpression representing the bitwise-and operation lhs & rhs

friend friend BooleanExpression operator< (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator <

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs < rhs

friend friend BooleanExpression operator<= (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator <=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs <= rhs

friend friend BooleanExpression operator== (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator ==

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs == rhs

friend friend BooleanExpression operator!= (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator !=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs != rhs

friend friend BooleanExpression operator>= (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator >=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs >= rhs

friend friend BooleanExpression operator> (const NumericExpression &lhs, const NumericExpression &rhs)

Binary operator >

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs > rhs

class deephaven::client::highlevel::StringExpression : public deephaven::client::highlevel::Expression

Subclassed by deephaven::client::highlevel::StrCol

Public Functions

explicit StringExpression(std::shared_ptr<impl::StringExpressionImpl> impl)

Constructor. Used internally.

StringExpression(const char *value)

Implicit conversion from const char *.

Parameters

value – The value

StringExpression(std::string_view value)

Implicit conversion from std::string_view

Parameters

value – The value

StringExpression(std::string value)

Implicit conversion from std::string

Parameters

value – The value

StringExpression(StringExpression&&) = default

Move constructor.

StringExpression &operator=(StringExpression&&) = default

Move assignment operator.

~StringExpression() override

Destructor.

BooleanExpression startsWith(const StringExpression &other) const

Builds a fluent expression representing whether object “starts with” another StringExpression.

Parameters

other – The other StringExpression.

Returns

a BooleanExpression expression representing this object “starts with” other.

BooleanExpression endsWith(const StringExpression &other) const

Builds a fluent expression representing whether object “ends with” another StringExpression.

Parameters

other – The other StringExpression.

Returns

a BooleanExpression expression representing this object “ends with” other.

BooleanExpression contains(const StringExpression &other) const

Builds a fluent expression representing whether object “contains” another StringExpression.

Parameters

other – The other StringExpression.

Returns

a BooleanExpression expression representing this object “contains” other.

BooleanExpression matches(const StringExpression &other) const

Builds a fluent expression representing whether object “matches” another StringExpression.

Parameters

other – The other StringExpression, whose representation should be a Java regular expression.

Returns

a BooleanExpression expression representing this object “matches” other.

std::shared_ptr<impl::StringExpressionImpl> implAsStringExpressionImpl() const

Used internally

Friends

friend friend StringExpression operator+ (const StringExpression &lhs, const StringExpression &rhs)

Binary operator + (string concatenation)

Parameters
  • lhs – A StringExpression representing the left-hand side of the concatenation

  • rhs – A StringExpression representing the right-hand side of the concatenation

Returns

The StringExpression representing the concatenation lhs + rhs

friend friend BooleanExpression operator< (const StringExpression &lhs, const StringExpression &rhs)

Binary operator <

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs < rhs

friend friend BooleanExpression operator<= (const StringExpression &lhs, const StringExpression &rhs)

Binary operator <=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs <= rhs

friend friend BooleanExpression operator== (const StringExpression &lhs, const StringExpression &rhs)

Binary operator ==

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs == rhs

friend friend BooleanExpression operator!= (const StringExpression &lhs, const StringExpression &rhs)

Binary operator !=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs != rhs

friend friend BooleanExpression operator>= (const StringExpression &lhs, const StringExpression &rhs)

Binary operator >=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs >= rhs

friend friend BooleanExpression operator> (const StringExpression &lhs, const StringExpression &rhs)

Binary operator >

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs > rhs

class deephaven::client::highlevel::DateTimeExpression : public deephaven::client::highlevel::Expression

Subclassed by deephaven::client::highlevel::DateTimeCol

Public Functions

explicit DateTimeExpression(std::shared_ptr<impl::DateTimeExpressionImpl> impl)

Constructor. Used internally.

DateTimeExpression(const char *value)

Implicit conversion from const char *.

Parameters

value – The value

DateTimeExpression(std::string_view value)

Implicit conversion from std::string_view

Parameters

value – The value

DateTimeExpression(std::string value)

Implicit conversion from std::string

Parameters

value – The value

DateTimeExpression(const DateTime &value)

Implicit conversion from DateTime

Parameters

value – The value

DateTimeExpression(DateTimeExpression&&) = default

Move constructor.

DateTimeExpression &operator=(DateTimeExpression&&) = default

Move assignment operator.

~DateTimeExpression() override

Destructor.

std::shared_ptr<impl::DateTimeExpressionImpl> implAsDateTimeExpressionImpl() const

Used internally.

Friends

friend friend BooleanExpression operator< (const DateTimeExpression &lhs, const DateTimeExpression &rhs)

Binary operator <

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs < rhs

friend friend BooleanExpression operator<= (const DateTimeExpression &lhs, const DateTimeExpression &rhs)

Binary operator <=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs <= rhs

friend friend BooleanExpression operator== (const DateTimeExpression &lhs, const DateTimeExpression &rhs)

Binary operator ==

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs == rhs

friend friend BooleanExpression operator!= (const DateTimeExpression &lhs, const DateTimeExpression &rhs)

Binary operator !=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs != rhs

friend friend BooleanExpression operator>= (const DateTimeExpression &lhs, const DateTimeExpression &rhs)

Binary operator >=

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs >= rhs

friend friend BooleanExpression operator> (const DateTimeExpression &lhs, const DateTimeExpression &rhs)

Binary operator >

Parameters
Returns

The BooleanExpression representing the result of the comparison lhs > rhs

class deephaven::client::highlevel::BooleanExpression : public deephaven::client::highlevel::Expression

A type in the “fluent” syntax that represents a boolean expression.

Public Functions

explicit BooleanExpression(std::shared_ptr<impl::BooleanExpressionImpl> impl)

Constructor. Used internally.

BooleanExpression(BooleanExpression&&) = default

Move constructor.

BooleanExpression &operator=(BooleanExpression&&) = default

Move assignment operator.

~BooleanExpression() final

Destructor.

Intermediate classes

class deephaven::client::highlevel::Expression

The root type shared by various leaf expression classes.

Subclassed by deephaven::client::highlevel::BooleanExpression, deephaven::client::highlevel::DateTimeExpression, deephaven::client::highlevel::NumericExpression, deephaven::client::highlevel::StringExpression

Public Functions

explicit Expression(std::shared_ptr<impl::ExpressionImpl> impl)

Constructor. Used internally.

Expression(Expression&&) = default

Move constructor.

Expression &operator=(Expression&&) = default

Move assignment operator.

virtual ~Expression()

Destructor.

BooleanExpression isNull() const

Builds a BooleanExpression representing whether this Expression is null.

Returns

The new BooleanExpression

AssignedColumn as(std::string columnName) const

Builds an AssignedColumn expression representing this expression as assigned to a new column name. Used for example in the TableHandle::select() method.

auto newTable = tableHandle.select(A, B, (C + 5).as("NewCol"));

Returns

The new AssignedColumn

inline const std::shared_ptr<impl::ExpressionImpl> &implAsExpressionImpl() const

Used internally