Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Record Class ScalarSubqueryOperand
java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.ScalarSubqueryOperand
- Record Components:
query- the relation whose one value this is; must not be nulllocation- the source location of the opening parenthesis; never null
- All Implemented Interfaces:
Operand
public record ScalarSubqueryOperand(RelNode query, SourceLocation location)
extends Record
implements Operand
A relation used as a value:
(γ COUNT(*) → n (σ customer_id = Customers.customer_id (Orders))).
The relation has one column. Its value is that column's value in its one row, or
NULL when it has none; more than one row is an error when the query runs. Inside it, a
qualified name whose relation the subquery does not read, Customers.customer_id
above, is a column of the row the value is computed for: the subquery is
correlated, and yields a value per row.
-
Constructor Summary
ConstructorsConstructorDescriptionScalarSubqueryOperand(RelNode query) Convenience constructor for tests; usesSourceLocation.UNKNOWN.ScalarSubqueryOperand(RelNode query, SourceLocation location) Creates an instance of aScalarSubqueryOperandrecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(OperandVisitor<R> visitor) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.query()Returns the value of thequeryrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.darkcollective.relix.ast.Operand
prettyPrint, prettyPrint
-
Constructor Details
-
ScalarSubqueryOperand
Creates an instance of aScalarSubqueryOperandrecord class. -
ScalarSubqueryOperand
Convenience constructor for tests; usesSourceLocation.UNKNOWN.
-
-
Method Details
-
accept
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
location
Returns the value of thelocationrecord component.
-