MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / EqPredicate

Class EqPredicate

src/QLPredicate.h:221–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219};
220
221struct EqPredicate : IPredicate, ReferenceCounted<EqPredicate>, FastAllocated<EqPredicate> {
222 void addref() override { ReferenceCounted<EqPredicate>::addref(); }
223 void delref() override { ReferenceCounted<EqPredicate>::delref(); }
224
225 TypeCode getTypeCode() const override { return TypeCode::EQ; }
226
227 DataValue value;
228
229 explicit EqPredicate(DataValue const& value) : value(value) {}
230
231 Future<bool> evaluate(Reference<IReadContext> const& context) override;
232 // EqPredicate can't be simplified, so no simplify()
233 std::string toString() override;
234
235 void simplify_and(SimplifyAndContext& combinable) override;
236
237 bool range_is_tight() override { return true; }
238
239 void get_range(Optional<DataValue>& min, Optional<DataValue>& max) override {
240 min = value;
241 max = value;
242 }
243 // Not(Eq) could be translated to Or(Range,Range), but it's not
244 // obvious that this is always a win without knowing about
245 // available indexes, so no simplify_not() here.
246};
247
248struct NotPredicate : IPredicate, ReferenceCounted<NotPredicate>, FastAllocated<NotPredicate> {
249 void addref() override { ReferenceCounted<NotPredicate>::addref(); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected