【发布时间】:2018-03-30 17:10:35
【问题描述】:
在下面的 this.realm = 行上收到此错误。不知道为什么这个代码在被格式化为工厂函数时会起作用
import Realm from 'realm';
export default function Db() {
this.realm = new Realm({
schema: [Wallet, WalletAddress, WalletTransaction, Log, APIWallet, APITransaction, APIAccount, Configuration],
path: config.db_path
});
logger(2, realm.path);
}
Db.prototype.doOneToMany = function(one, many) {..};
Db.prototype.query = function(model, filter) {..};
Db.prototype.insert = function(model, options) {..};
Db.prototype.del = function(model, obj) {..};
Db.prototype.update = function(obj, options) {..};
Db.prototype.write = function(func) {..};
Db.prototype.close = function() {..};
错误
【问题讨论】:
标签: javascript react-native realm