1 ////////////////////////////////////////////////////////////////////////////
3 // Copyright 2017 Realm Inc.
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
17 ////////////////////////////////////////////////////////////////////////////
19 #import "RLMResults_Private.h"
25 NS_ASSUME_NONNULL_BEGIN
27 @interface RLMResults () {
29 realm::Results _results;
33 Initialize a 'raw' `RLMResults` using only an object store level Results.
34 This is only meant for applications where a results collection is being backed
35 by an object store object class that has no binding-level equivalent. The
36 consumer is responsible for bridging between the underlying objects and whatever
37 binding-level class is being vended out.
39 - (instancetype)initWithResults:(realm::Results)results;
41 + (instancetype)resultsWithObjectInfo:(RLMClassInfo&)info results:(realm::Results)results;
50 void RLMThrowResultsError(NSString * _Nullable aggregateMethod);
52 #pragma clang diagnostic push
53 #pragma clang diagnostic ignored "-Wnullability-completeness"
54 template<typename Function>
55 static auto translateRLMResultsErrors(Function&& f, NSString *aggregateMethod=nil) {
60 RLMThrowResultsError(aggregateMethod);
63 #pragma clang diagnostic pop