【文件属性】:
文件名称:monk-populate:co-monk 的类似猫鼬的 .populate 方法
文件大小:369KB
文件格式:ZIP
更新时间:2021-06-12 15:57:53
JavaScript
僧人
类似猫鼬的 .populate 方法用于联合僧侣。
有关使用情况,请检查test文件夹。
例子
var users = monk_db.get('users');
var allTweets = [
{ content: 'Foo bar', by: { _id: '742ce0fe0e512c9043a4b9af' } },
{ content: 'Foo baz', by: { _id: '742ce0fe0e512c9043a4b9ag' } },
];
// will expand the "by" field using the "by._id" as primary key
allTweets = yield populate(users, allTweets, [''], 'by._id');
执照
该程序是免费软件:您可以根据*软件基金会发布的 G