Record Class QueryRelationSymbol
java.lang.Object
java.lang.Record
com.darkcollective.relix.symbol.relation.QueryRelationSymbol
- Record Components:
namespace- the namespace this symbol belongs to; must not be blankdeclaredName- the name as written by the user; must not be blankprovenance- built-in or user-defined; must not be nullshadowPolicy- replacement policy for this symbol; must not be nullschema- the structural description of the result relation; must not be nullbody- the relational algebra expression defining this relation; must not be null
- All Implemented Interfaces:
RelationSymbol,Symbol
public record QueryRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema, RelNode body)
extends Record
implements RelationSymbol
A named relational algebra expression — essentially a stored view.
The body is a RelNode representing the relational algebra expression
that defines this relation. It is stored for later semantic analysis,
optimisation, and pretty-printing; no evaluation takes place at registration time.
A QueryRelationSymbol is typically produced by the relix-lang
parser when it encounters an assignment of the form:
ActiveUsers := { σ status = "active" (Users) };
The Schema represents the declared output schema. If the
schema cannot be determined statically from the body, callers may omit explicit
typing by using ScalarType.ANY for all
columns.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema, RelNode body) Creates an instance of aQueryRelationSymbolrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.Returns the value of thedeclaredNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenamespacerecord component.static QueryRelationSymbolCreates a user-defined query relation in the"default"namespace withShadowPolicy.PERMITTED.Returns the value of theprovenancerecord component.schema()Returns the value of theschemarecord component.Returns the value of theshadowPolicyrecord 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.symbol.Symbol
canonicalName
-
Constructor Details
-
QueryRelationSymbol
public QueryRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema, RelNode body) Creates an instance of aQueryRelationSymbolrecord class.- Parameters:
namespace- the value for thenamespacerecord componentdeclaredName- the value for thedeclaredNamerecord componentprovenance- the value for theprovenancerecord componentshadowPolicy- the value for theshadowPolicyrecord componentschema- the value for theschemarecord componentbody- the value for thebodyrecord component
-
-
Method Details
-
of
Creates a user-defined query relation in the"default"namespace withShadowPolicy.PERMITTED.- Parameters:
name- the relation name; must not be blankschema- the declared output schema; must not be nullbody- the relational algebra expression; must not be null- Returns:
- a new
QueryRelationSymbol
-
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). -
namespace
Returns the value of thenamespacerecord component. -
declaredName
Returns the value of thedeclaredNamerecord component.- Specified by:
declaredNamein interfaceSymbol- Returns:
- the value of the
declaredNamerecord component
-
provenance
Returns the value of theprovenancerecord component.- Specified by:
provenancein interfaceSymbol- Returns:
- the value of the
provenancerecord component
-
shadowPolicy
Returns the value of theshadowPolicyrecord component.- Specified by:
shadowPolicyin interfaceSymbol- Returns:
- the value of the
shadowPolicyrecord component
-
schema
Returns the value of theschemarecord component.- Specified by:
schemain interfaceRelationSymbol- Returns:
- the value of the
schemarecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-