Firebase“创建”触发器的云功能-多个集合

时间:2020-06-17 13:13:16

标签: javascript node.js firebase google-cloud-functions

我在根上创建了3个Collection,即同一项目中的Brand,Pack和Item。我可以同时针对每个集合保留“创建”功能吗?

2 个答案:

答案 0 :(得分:1)

是的,只需使用onCreate触发器创建三个不同的通配符函数

import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator

x_values = [1,2,3]
y_values = [1,4,9]

plt.plot(x_values,y_values,'g^')
plt.grid(color='black', linestyle="dotted", linewidth=1)

plt.gca().xaxis.set_major_locator(MultipleLocator(1))
plt.gca().yaxis.set_major_locator(MultipleLocator(1))

plt.xlabel("x")
plt.xlim(0.0, 12)
plt.ylabel("y")
plt.ylim(0.0, 12)
plt.show()

答案 1 :(得分:1)

请注意,您可以使用任意多个通配符来替换显式的集合文档 ID,例如:

1
9
13

查看文档:{​​{3}}