PresenceTestHasCost determines whether presence testing has a cost of one or zero. Defaults to presence test has a cost of one.
(hasCost bool)
| 186 | // PresenceTestHasCost determines whether presence testing has a cost of one or zero. |
| 187 | // Defaults to presence test has a cost of one. |
| 188 | func PresenceTestHasCost(hasCost bool) CostTrackerOption { |
| 189 | return func(tracker *CostTracker) error { |
| 190 | tracker.presenceTestHasCost = hasCost |
| 191 | return nil |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | // NewCostTracker creates a new CostTracker with a given estimator and a set of functional CostTrackerOption values. |
| 196 | func NewCostTracker(estimator ActualCostEstimator, opts ...CostTrackerOption) (*CostTracker, error) { |
no outgoing calls