更新时间:2023-02-14 09:37:17
在节点中.js你将在'ListCollectionIds'方法之后
In Node.js you'll be after the 'ListCollectionIds' method
var firestore = require('firestore.v1beta1');
var client = firestore.v1beta1({
// optional auth parameters.
});
// Iterate over all elements.
var formattedParent = client.anyPathPath("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]");
client.listCollectionIds({parent: formattedParent}).then(function(responses) {
var resources = responses[0];
for (var i = 0; i < resources.length; ++i) {
// doThingsWith(resources[i])
}
})
.catch(function(err) {
console.error(err);
});
客户端SDK(Web,iOS,Android)目前不支持此功能。
This is not currently supported in the client SDKs (Web, iOS, Android).