public class Predicate extends Object
Constructor and Description |
---|
Predicate()
Creates an empty predicate, corresponding to "true".
|
Predicate(Term t)
Creates a predicate containing a single term.
|
Modifier and Type | Method and Description |
---|---|
void |
conjunctWith(Term t)
Modifies the predicate to be the conjunction of itself and the specified
term.
|
ConstantRange |
constantRange(String fldName)
Determines if the specified field is constrained by a constant range in
this predicate.
|
boolean |
isSatisfied(Record rec)
Returns true if this predicate evaluates to true with respect to the
specified record.
|
Set<String> |
joinFields(String fldName)
Determines if there are terms of the form "F1=F2" or result in "F1=F2"
via equal transitivity, where F1 is the specified field and F2 is another
field (called join field).
|
Predicate |
joinPredicate(Schema sch1,
Schema sch2)
Returns the sub-predicate consisting of terms that applies to the union
of the two specified schemas, but not to either schema separately.
|
Predicate |
selectPredicate(Schema sch)
Returns the sub-predicate that applies to the specified schema.
|
String |
toString() |
public Predicate()
public Predicate(Term t)
t
- the termpublic void conjunctWith(Term t)
t
- the term to conjunct withpublic boolean isSatisfied(Record rec)
rec
- the recordpublic Predicate selectPredicate(Schema sch)
sch
- the schemapublic Predicate joinPredicate(Schema sch1, Schema sch2)
sch1
- the first schemasch2
- the second schemapublic ConstantRange constantRange(String fldName)
fldName
- the name of the fieldpublic Set<String> joinFields(String fldName)
fldName
- the name of the fieldCopyright © 2022 VanillaDB Organization. All rights reserved.