2016-02-18 11:59:34 -08:00
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright 2016 Realm Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
2015-08-13 09:12:48 -07:00
|
|
|
|
2015-12-01 14:52:38 -08:00
|
|
|
#pragma once
|
|
|
|
|
2015-12-01 19:46:31 -08:00
|
|
|
#include <memory>
|
2016-03-30 14:11:57 -07:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "jsc_types.hpp"
|
2015-08-13 09:12:48 -07:00
|
|
|
|
|
|
|
namespace realm {
|
2016-03-30 14:11:57 -07:00
|
|
|
class ObjectSchema;
|
2015-08-13 09:12:48 -07:00
|
|
|
class Realm;
|
2015-11-20 14:05:18 -08:00
|
|
|
class Query;
|
2015-08-13 09:12:48 -07:00
|
|
|
typedef std::shared_ptr<Realm> SharedRealm;
|
|
|
|
}
|
|
|
|
|
|
|
|
JSClassRef RJSResultsClass();
|
|
|
|
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, std::string className);
|
2015-11-10 15:58:04 -08:00
|
|
|
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, std::string className, std::string query, std::vector<JSValueRef> args);
|
2016-02-17 20:48:27 -08:00
|
|
|
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, const realm::ObjectSchema &objectSchema, realm::Query query, bool live = true);
|
2016-02-18 13:41:11 -08:00
|
|
|
JSObjectRef RJSResultsCreateFiltered(JSContextRef ctx, realm::SharedRealm realm, const realm::ObjectSchema &objectSchema, realm::Query query, size_t argumentCount, const JSValueRef arguments[]);
|
|
|
|
JSObjectRef RJSResultsCreateSorted(JSContextRef ctx, realm::SharedRealm realm, const realm::ObjectSchema &objectSchema, realm::Query query, size_t argumentCount, const JSValueRef arguments[]);
|