【发布时间】:2018-10-19 10:31:29
【问题描述】:
我有一个 Meteor 应用程序并生成了一些附加了 SimpleSchema https://github.com/aldeed/simple-schema-js 的数据库集合。
Cards = new Mongo.Collection('cards');
Cards.attachSchema(new SimpleSchema({
title: {
type: String,
},
archived: {
type: Boolean,
autoValue() {
if (this.isInsert && !this.isSet) {
return false;
}
},
},
completed: {
type: Boolean,
autoValue() {
if (this.isInsert && !this.isSet) {
return false;
}
},
},
等等。
是否有类似log( Cards.schema ) 的函数输出所有已定义的属性/字段及其数据类型?
【问题讨论】:
标签: json mongodb meteor simple-schema meteor-collections