Skip to content

Commit 36cbf43

Browse files
authored
Support DNF transform for Or Query Support (#10290)
* Support DNF transform * Replace with actual proto * Address feedback
1 parent 7668a85 commit 36cbf43

26 files changed

+1275
-332
lines changed

Firestore/Example/Firestore.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
053C11420E49AE1A77E21C20 /* memory_document_overlay_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 29D9C76922DAC6F710BC1EF4 /* memory_document_overlay_cache_test.cc */; };
3838
056542AD1D0F78E29E22EFA9 /* grpc_connection_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6D9649021544D4F00EB9CFB /* grpc_connection_test.cc */; };
3939
0575F3004B896D94456A74CE /* status_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3CAA33F964042646FDDAF9F9 /* status_testing.cc */; };
40+
0595B5EBEB8F09952B72C883 /* logic_utils_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */; };
4041
05D99904EA713414928DD920 /* query_listener_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7C3F995E040E9E9C5E8514BB /* query_listener_test.cc */; };
4142
062072B72773A055001655D7 /* AsyncAwaitIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 062072B62773A055001655D7 /* AsyncAwaitIntegrationTests.swift */; };
4243
062072B82773A055001655D7 /* AsyncAwaitIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 062072B62773A055001655D7 /* AsyncAwaitIntegrationTests.swift */; };
@@ -82,6 +83,7 @@
8283
0CEE93636BA4852D3C5EC428 /* timestamp_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = ABF6506B201131F8005F2C74 /* timestamp_test.cc */; };
8384
0D124ED1B567672DD1BCEF05 /* memory_target_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 2286F308EFB0534B1BDE05B9 /* memory_target_cache_test.cc */; };
8485
0D2D25522A94AA8195907870 /* status.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9920B89AAC00B5BCE7 /* status.pb.cc */; };
86+
0D6AE96565603226DB2E6838 /* logic_utils_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */; };
8587
0D88B4CB916A4752B08E5B42 /* query_listener_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7C3F995E040E9E9C5E8514BB /* query_listener_test.cc */; };
8688
0DAA255C2FEB387895ADEE12 /* bits_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB380D01201BC69F00D97691 /* bits_test.cc */; };
8789
0DBD29A16030CDCD55E38CAB /* mutation_queue_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 3068AA9DFBBA86C1FE2A946E /* mutation_queue_test.cc */; };
@@ -704,6 +706,7 @@
704706
6F914209F46E6552B5A79570 /* async_queue_std_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6FB4681208EA0BE00554BA2 /* async_queue_std_test.cc */; };
705707
6FAC16B7FBD3B40D11A6A816 /* target.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE7D20B89AAC00B5BCE7 /* target.pb.cc */; };
706708
6FC85C48CF8235BA1845E1C8 /* FSTUserDataReaderTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8D9892F204959C50613F16C8 /* FSTUserDataReaderTests.mm */; };
709+
6FCC64A1937E286E76C294D0 /* logic_utils_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */; };
707710
6FD2369F24E884A9D767DD80 /* FIRDocumentSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E04B202154AA00B64F25 /* FIRDocumentSnapshotTests.mm */; };
708711
6FF2B680CC8631B06C7BD7AB /* FSTMemorySpecTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E02F20213FFC00B64F25 /* FSTMemorySpecTests.mm */; };
709712
70A171FC43BE328767D1B243 /* path_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 403DBF6EFB541DFD01582AA3 /* path_test.cc */; };
@@ -777,6 +780,7 @@
777780
7E97B0F04E25610FF37E9259 /* memory_target_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 2286F308EFB0534B1BDE05B9 /* memory_target_cache_test.cc */; };
778781
7EAB3129A58368EE4BD449ED /* leveldb_migrations_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = EF83ACD5E1E9F25845A9ACED /* leveldb_migrations_test.cc */; };
779782
7EF540911720DAAF516BEDF0 /* query_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B9C261C26C5D311E1E3C0CB9 /* query_test.cc */; };
783+
7EF56BA2A480026D62CCA35A /* logic_utils_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */; };
780784
7F6199159E24E19E2A3F5601 /* schedule_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9B0B005A79E765AF02793DCE /* schedule_test.cc */; };
781785
7F771EB980D9CFAAB4764233 /* view_testing.cc in Sources */ = {isa = PBXBuildFile; fileRef = A5466E7809AD2871FFDE6C76 /* view_testing.cc */; };
782786
7F9CE96304D413F7E7AA0DA0 /* memory_target_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 2286F308EFB0534B1BDE05B9 /* memory_target_cache_test.cc */; };
@@ -1154,6 +1158,7 @@
11541158
D00E69F7FDF2BE674115AD3F /* field_path_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B686F2AD2023DDB20028D6BE /* field_path_test.cc */; };
11551159
D04CBBEDB8DC16D8C201AC49 /* leveldb_target_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = E76F0CDF28E5FA62D21DE648 /* leveldb_target_cache_test.cc */; };
11561160
D143FBD057481C1A59B27E5E /* persistence_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 54DA12A31F315EE100DD57A1 /* persistence_spec_test.json */; };
1161+
D156B9F19B5B29E77664FDFC /* logic_utils_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */; };
11571162
D1690214781198276492442D /* event_manager_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6F57521E161450FAF89075ED /* event_manager_test.cc */; };
11581163
D18DBCE3FE34BF5F14CF8ABD /* mutation_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = C8522DE226C467C54E6788D8 /* mutation_test.cc */; };
11591164
D1BCDAEACF6408200DFB9870 /* overlay_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = E1459FA70B8FC18DE4B80D0D /* overlay_test.cc */; };
@@ -1338,6 +1343,7 @@
13381343
F800F48743D3CB31BA1EBAE7 /* random_access_queue_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 014C60628830D95031574D15 /* random_access_queue_test.cc */; };
13391344
F8126CD7308A4B8AEC0F30A8 /* bundle.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = A366F6AE1A5A77548485C091 /* bundle.pb.cc */; };
13401345
F8BD2F61EFA35C2D5120D9EB /* field_index_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = BF76A8DA34B5B67B4DD74666 /* field_index_test.cc */; };
1346+
F924DF3D9DCD2720C315A372 /* logic_utils_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */; };
13411347
F950A371FADCA2F0B73683E0 /* remote_document_cache_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7EB299CF85034F09CFD6F3FD /* remote_document_cache_test.cc */; };
13421348
F9705E595FC3818F13F6375A /* to_string_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = B68B1E002213A764008977EF /* to_string_apple_test.mm */; };
13431349
F9DC01FCBE76CD4F0453A67C /* strerror_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 358C3B5FE573B1D60A4F7592 /* strerror_test.cc */; };
@@ -1451,6 +1457,7 @@
14511457
2220F583583EFC28DE792ABE /* Pods_Firestore_IntegrationTests_tvOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_IntegrationTests_tvOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
14521458
2286F308EFB0534B1BDE05B9 /* memory_target_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_target_cache_test.cc; sourceTree = "<group>"; };
14531459
277EAACC4DD7C21332E8496A /* lru_garbage_collector_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = lru_garbage_collector_test.cc; sourceTree = "<group>"; };
1460+
28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = logic_utils_test.cc; sourceTree = "<group>"; };
14541461
29D9C76922DAC6F710BC1EF4 /* memory_document_overlay_cache_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = memory_document_overlay_cache_test.cc; sourceTree = "<group>"; };
14551462
2A0CF41BA5AED6049B0BEB2C /* objc_type_traits_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = objc_type_traits_apple_test.mm; sourceTree = "<group>"; };
14561463
2B50B3A0DF77100EEE887891 /* Pods_Firestore_Tests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -2055,6 +2062,7 @@
20552062
B69CF3F02227386500B281C8 /* hashing_test_apple.mm */,
20562063
54A0353420A3D8CB003E0143 /* iterator_adaptors_test.cc */,
20572064
54C2294E1FECABAE007D065B /* log_test.cc */,
2065+
28B45B2104E2DAFBBF86DBB7 /* logic_utils_test.cc */,
20582066
0473AFFF5567E667A125347B /* ordered_code_benchmark.cc */,
20592067
AB380D03201BC6E400D97691 /* ordered_code_test.cc */,
20602068
403DBF6EFB541DFD01582AA3 /* path_test.cc */,
@@ -3704,6 +3712,7 @@
37043712
974FF09E6AFD24D5A39B898B /* local_serializer_test.cc in Sources */,
37053713
C23552A6D9FB0557962870C2 /* local_store_test.cc in Sources */,
37063714
DBDC8E997E909804F1B43E92 /* log_test.cc in Sources */,
3715+
F924DF3D9DCD2720C315A372 /* logic_utils_test.cc in Sources */,
37073716
3F6C9F8A993CF4B0CD51E7F0 /* lru_garbage_collector_test.cc in Sources */,
37083717
12158DFCEE09D24B7988A340 /* maybe_document.pb.cc in Sources */,
37093718
FA43BA0195DA90CE29B29D36 /* memory_bundle_cache_test.cc in Sources */,
@@ -3911,6 +3920,7 @@
39113920
0FA4D5601BE9F0CB5EC2882C /* local_serializer_test.cc in Sources */,
39123921
0C4219F37CC83614F1FD44ED /* local_store_test.cc in Sources */,
39133922
12BB9ED1CA98AA52B92F497B /* log_test.cc in Sources */,
3923+
7EF56BA2A480026D62CCA35A /* logic_utils_test.cc in Sources */,
39143924
1F56F51EB6DF0951B1F4F85B /* lru_garbage_collector_test.cc in Sources */,
39153925
88FD82A1FC5FEC5D56B481D8 /* maybe_document.pb.cc in Sources */,
39163926
9611A0FAA2E10A6B1C1AC2EA /* memory_bundle_cache_test.cc in Sources */,
@@ -4134,6 +4144,7 @@
41344144
F05B277F16BDE6A47FE0F943 /* local_serializer_test.cc in Sources */,
41354145
EE470CC3C8FBCDA5F70A8466 /* local_store_test.cc in Sources */,
41364146
CAFB1E0ED514FEF4641E3605 /* log_test.cc in Sources */,
4147+
0595B5EBEB8F09952B72C883 /* logic_utils_test.cc in Sources */,
41374148
913F6E57AF18F84C5ECFD414 /* lru_garbage_collector_test.cc in Sources */,
41384149
6F511ABFD023AEB81F92DB12 /* maybe_document.pb.cc in Sources */,
41394150
FF6333B8BD9732C068157221 /* memory_bundle_cache_test.cc in Sources */,
@@ -4357,6 +4368,7 @@
43574368
009CDC5D8C96F54A229F462F /* local_serializer_test.cc in Sources */,
43584369
DF4B3835C5AA4835C01CD255 /* local_store_test.cc in Sources */,
43594370
6B94E0AE1002C5C9EA0F5582 /* log_test.cc in Sources */,
4371+
0D6AE96565603226DB2E6838 /* logic_utils_test.cc in Sources */,
43604372
95CE3F5265B9BB7297EE5A6B /* lru_garbage_collector_test.cc in Sources */,
43614373
C19214F5B43AA745A7FC2FC1 /* maybe_document.pb.cc in Sources */,
43624374
94854FAEAEA75A1AC77A0515 /* memory_bundle_cache_test.cc in Sources */,
@@ -4574,6 +4586,7 @@
45744586
020AFD89BB40E5175838BB76 /* local_serializer_test.cc in Sources */,
45754587
D21060F8115A5F48FC3BF335 /* local_store_test.cc in Sources */,
45764588
54C2294F1FECABAE007D065B /* log_test.cc in Sources */,
4589+
D156B9F19B5B29E77664FDFC /* logic_utils_test.cc in Sources */,
45774590
1290FA77A922B76503AE407C /* lru_garbage_collector_test.cc in Sources */,
45784591
618BBEA720B89AAC00B5BCE7 /* maybe_document.pb.cc in Sources */,
45794592
A0E1C7F5C7093A498F65C5CF /* memory_bundle_cache_test.cc in Sources */,
@@ -4816,6 +4829,7 @@
48164829
A585BD0F31E90980B5F5FBCA /* local_serializer_test.cc in Sources */,
48174830
A97ED2BAAEDB0F765BBD5F98 /* local_store_test.cc in Sources */,
48184831
677C833244550767B71DB1BA /* log_test.cc in Sources */,
4832+
6FCC64A1937E286E76C294D0 /* logic_utils_test.cc in Sources */,
48194833
4DF18D15AC926FB7A4888313 /* lru_garbage_collector_test.cc in Sources */,
48204834
12E04A12ABD5533B616D552A /* maybe_document.pb.cc in Sources */,
48214835
479A392EAB42453D49435D28 /* memory_bundle_cache_test.cc in Sources */,

Firestore/Source/API/FIRFirestore+Internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "Firestore/core/src/util/async_queue.h"
2525

2626
@class FIRApp;
27-
@class FSTFirestoreClient;
2827
@class FSTUserDataReader;
2928

3029
namespace firebase {

Firestore/core/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ target_link_libraries(
143143
absl::optional
144144
absl::strings
145145
absl::time
146+
protobuf-nanopb-static
147+
firestore_protos_nanopb
148+
grpc++
146149
)
147150

148151
if(HAVE_OPENSSL_RAND_H)

Firestore/core/src/core/composite_filter.cc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,32 +73,23 @@ bool CompositeFilter::Rep::IsDisjunction() const {
7373
}
7474

7575
bool CompositeFilter::Rep::IsFlat() const {
76-
for (const auto& filter : filters_) {
77-
if (filter.IsACompositeFilter()) {
78-
return false;
79-
}
80-
}
81-
return true;
76+
return std::all_of(
77+
filters_.cbegin(), filters_.cend(),
78+
[](const Filter& filter) { return filter.IsAFieldFilter(); });
8279
}
8380

8481
bool CompositeFilter::Rep::Matches(const model::Document& doc) const {
8582
if (IsConjunction()) {
8683
// For conjunctions, all filters must match, so return false if any filter
8784
// doesn't match.
88-
for (const auto& filter : filters_) {
89-
if (!filter.Matches(doc)) {
90-
return false;
91-
}
92-
}
93-
return true;
85+
return std::all_of(
86+
filters_.cbegin(), filters_.cend(),
87+
[&doc](const Filter& filter) { return filter.Matches(doc); });
9488
} else {
9589
// For disjunctions, at least one filter should match.
96-
for (const auto& filter : filters_) {
97-
if (filter.Matches(doc)) {
98-
return true;
99-
}
100-
}
101-
return false;
90+
return std::any_of(
91+
filters_.cbegin(), filters_.cend(),
92+
[&doc](const Filter& filter) { return filter.Matches(doc); });
10293
}
10394
}
10495

@@ -122,6 +113,15 @@ bool CompositeFilter::Rep::Equals(const Filter::Rep& other) const {
122113
return op_ == other_rep.op_ && filters_ == other_rep.filters_;
123114
}
124115

116+
CompositeFilter CompositeFilter::WithAddedFilters(
117+
std::vector<core::Filter>&& other_filters) {
118+
std::vector<Filter> merged_filters(filters());
119+
merged_filters.insert(merged_filters.end(),
120+
std::make_move_iterator(other_filters.begin()),
121+
std::make_move_iterator(other_filters.end()));
122+
return CompositeFilter::Create(std::move(merged_filters), op());
123+
}
124+
125125
const FieldFilter* CompositeFilter::Rep::FindFirstMatchingFilter(
126126
const CheckFunction& condition) const {
127127
for (const auto& field_filter : GetFlattenedFilters()) {

Firestore/core/src/core/composite_filter.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ class CompositeFilter : public Filter {
8080
return composite_filter_rep().IsFlat();
8181
}
8282

83+
/**
84+
* Returns a new composite filter that contains all filter from `this`
85+
* plus all the given filters.
86+
*/
87+
CompositeFilter WithAddedFilters(std::vector<core::Filter>&& other_filters);
88+
8389
private:
8490
class Rep : public Filter::Rep {
8591
private:

Firestore/core/src/core/field_filter.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ std::string FieldFilter::Rep::CanonicalId() const {
186186
}
187187

188188
std::string FieldFilter::Rep::ToString() const {
189-
return util::StringFormat("%s %s %s", field_.CanonicalString(),
190-
CanonicalName(op_),
191-
model::CanonicalId(*value_rhs_));
189+
return CanonicalId();
192190
}
193191

194192
bool FieldFilter::Rep::Equals(const Filter::Rep& other) const {

Firestore/core/src/core/query.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ model::DocumentComparator Query::Comparator() const {
293293
});
294294
}
295295

296-
const std::string Query::CanonicalId() const {
296+
std::string Query::CanonicalId() const {
297297
if (limit_type_ != LimitType::None) {
298298
return absl::StrCat(ToTarget().CanonicalId(),
299299
"|lt:", (limit_type_ == LimitType::Last) ? "l" : "f");

Firestore/core/src/core/query.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class Query {
235235
*/
236236
model::DocumentComparator Comparator() const;
237237

238-
const std::string CanonicalId() const;
238+
std::string CanonicalId() const;
239239

240240
std::string ToString() const;
241241

Firestore/core/src/core/target.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@
3535

3636
namespace firebase {
3737
namespace firestore {
38+
3839
namespace bundle {
3940
class BundleSerializer;
40-
}
41+
} // namespace bundle
42+
43+
namespace local {
44+
class LevelDbIndexManager;
45+
} // namespace local
46+
4147
namespace core {
4248

4349
using CollectionGroupId = std::shared_ptr<const std::string>;
@@ -184,6 +190,7 @@ class Target {
184190
friend class Query;
185191
friend class remote::Serializer;
186192
friend class bundle::BundleSerializer;
193+
friend class local::LevelDbIndexManager;
187194

188195
/** Returns the field filters that target the given field path. */
189196
std::vector<FieldFilter> GetFieldFiltersForPath(

Firestore/core/src/local/index_backfiller.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int IndexBackfiller::WriteEntriesForCollectionGroup(
6969
const std::string& collection_group,
7070
int documents_remaining_under_cap) const {
7171
IndexManager* index_manager = local_store->index_manager();
72-
const auto local_documents_view = local_store->local_documents();
72+
const auto* const local_documents_view = local_store->local_documents();
7373

7474
// Use the earliest offset of all field indexes to query the local cache.
7575
const auto existing_offset = index_manager->GetMinOffset(collection_group);
@@ -95,9 +95,9 @@ model::IndexOffset IndexBackfiller::GetNewOffset(
9595
max_offset = std::move(new_offset);
9696
}
9797
}
98-
return IndexOffset(
98+
return {
9999
max_offset.read_time(), max_offset.document_key(),
100-
std::max(lookup_result.batch_id(), existing_offset.largest_batch_id()));
100+
std::max(lookup_result.batch_id(), existing_offset.largest_batch_id())};
101101
}
102102

103103
} // namespace local

Firestore/core/src/local/index_manager.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,15 @@ class IndexManager {
124124
* and returns the minimum offset of them all. Asserts that the target can be
125125
* served from index.
126126
*/
127-
virtual const model::IndexOffset GetMinOffset(
128-
const core::Target& target) const = 0;
127+
virtual model::IndexOffset GetMinOffset(const core::Target& target) = 0;
129128

130129
/** Returns the minimum offset for the given collection group. */
131-
virtual const model::IndexOffset GetMinOffset(
130+
virtual model::IndexOffset GetMinOffset(
132131
const std::string& collection_group) const = 0;
133132

134133
/** Returns the type of index (if any) that can be used to serve the given
135134
* target */
136-
virtual IndexType GetIndexType(const core::Target& target) const = 0;
135+
virtual IndexType GetIndexType(const core::Target& target) = 0;
137136

138137
/**
139138
* Returns the documents that match the given target based on the provided

0 commit comments

Comments
 (0)