realm-js/src/js_schema.hpp

19 lines
516 B
C++
Raw Normal View History

/* Copyright 2015 Realm Inc - All Rights Reserved
* Proprietary and Confidential
*/
2015-08-13 16:12:48 +00:00
2015-12-01 22:52:38 +00:00
#pragma once
#include "js_util.hpp"
#include <map>
2015-08-13 16:12:48 +00:00
namespace realm {
class Schema;
2015-09-04 22:43:26 +00:00
using ObjectDefaults = std::map<std::string, JSValueRef>;
2015-08-13 16:12:48 +00:00
}
JSClassRef RJSSchemaClass();
JSObjectRef RJSSchemaCreate(JSContextRef ctx, realm::Schema *schema);
realm::Schema RJSParseSchema(JSContextRef ctx, JSObjectRef jsonObject, std::map<std::string, realm::ObjectDefaults> &defaults, std::map<std::string, JSValueRef> &prototypes);