Objects

The Deephaven Query Language has native support for objects within query strings.

Example

The following example shows how to create an object and use one of its methods within a query string.

class MyStringClass {
    private String strn

    MyStringClass(String strn) {
        this.strn = strn
    }

    String myString() {
        return this.strn
    }
}

obj = new MyStringClass("A")

source = newTable(
    stringCol("Strings", "A", "B", "C")
)

result = source.update("Match = Strings_[i] == obj.myString()")