我有一个 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 )
输出所有定义的属性/字段及其数据类型?