我试图使用’OR’||在equalTo()方法中的语句,但这似乎不起作用.我是否必须为每个值单独调用,或者是否有办法在firebase中进行条件查询?
export const startSetContent = () => {
return (dispatch,getState) => {
const ref = database.ref("content");
return ref
.orderByChild("category")
.equalTo('one-act-play' || 'ten-min-play' || 'full-length-play')
.once('value')
.then(snapshot => {
const content = [];
snapshot.forEach(childSnapshot => {
content.push({
id: childSnapshot.key,...childSnapshot.val()
});
});
dispatch(setContent(content));
});
};
};