久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='I2HPQ'><style id='I2HPQ'><dir id='I2HPQ'><q id='I2HPQ'></q></dir></style></legend>
<i id='I2HPQ'><tr id='I2HPQ'><dt id='I2HPQ'><q id='I2HPQ'><span id='I2HPQ'><b id='I2HPQ'><form id='I2HPQ'><ins id='I2HPQ'></ins><ul id='I2HPQ'></ul><sub id='I2HPQ'></sub></form><legend id='I2HPQ'></legend><bdo id='I2HPQ'><pre id='I2HPQ'><center id='I2HPQ'></center></pre></bdo></b><th id='I2HPQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='I2HPQ'><tfoot id='I2HPQ'></tfoot><dl id='I2HPQ'><fieldset id='I2HPQ'></fieldset></dl></div>

<tfoot id='I2HPQ'></tfoot>

      <small id='I2HPQ'></small><noframes id='I2HPQ'>

      • <bdo id='I2HPQ'></bdo><ul id='I2HPQ'></ul>

      在 Firebase 中過濾多個子屬性的產(chǎn)品

      Filter products on multiple child properties in Firebase(在 Firebase 中過濾多個子屬性的產(chǎn)品)
        <tbody id='eypyU'></tbody>
    1. <tfoot id='eypyU'></tfoot>
    2. <legend id='eypyU'><style id='eypyU'><dir id='eypyU'><q id='eypyU'></q></dir></style></legend>

      <i id='eypyU'><tr id='eypyU'><dt id='eypyU'><q id='eypyU'><span id='eypyU'><b id='eypyU'><form id='eypyU'><ins id='eypyU'></ins><ul id='eypyU'></ul><sub id='eypyU'></sub></form><legend id='eypyU'></legend><bdo id='eypyU'><pre id='eypyU'><center id='eypyU'></center></pre></bdo></b><th id='eypyU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eypyU'><tfoot id='eypyU'></tfoot><dl id='eypyU'><fieldset id='eypyU'></fieldset></dl></div>
        <bdo id='eypyU'></bdo><ul id='eypyU'></ul>

          1. <small id='eypyU'></small><noframes id='eypyU'>

              • 本文介紹了在 Firebase 中過濾多個子屬性的產(chǎn)品的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我最近詢問如何根據(jù)子屬性過濾產(chǎn)品(請參閱:根據(jù) Firebase 中的子子項過濾產(chǎn)品).

                I recently asked how to filter products based on their child property (see: Filter products based on the sub child in Firebase).

                作為回顧,我的結(jié)構(gòu)如下所示:

                As a recap my structure looks as follows:

                products/
                     product1
                        /author: 12345
                        /title: "Awesome"
                        /category: "catA"
                        /description: "more awesome"
                     product2
                        /author: 67890
                        /title: "Other"
                        /category: "catB"
                        /description: "otherawesome"
                     product3
                        /author: 12345
                        /title: "Billy"
                        /category: "catB"
                        /description: "otherawesome"
                

                要過濾出作者為 12345 的所有產(chǎn)品,我們可以簡單地使用:

                And to filter out all products with author 12345 we can simply use:

                ref.child("products").orderByChild('author').equalTo(12345)...
                

                但是,當我有多個 AND 語句或多個 OR 語句時該怎么辦?

                如果我想過濾掉怎么辦:

                So what if I want to filter out:

                • 作者為 12345 AND 類別 catA 的所有產(chǎn)品(返回 product1)

                • all products with author 12345 AND category catA (returns product1)

                作者為 12345 或作者 67890 的所有產(chǎn)品(返回 product1product3)

                all products with author 12345 OR author 67890 (returns product1 and product3)

                對于第一部分,我嘗試了:

                For the first part, I tried:

                ref.child("products").orderByChild('author').equalTo(12345).orderByChild('category').equalTo('catA')...
                

                但這不起作用(拋出錯誤You can't combine multiple orderBy calls)

                but that did not work (throws error You can't combine multiple orderBy calls)

                另請參閱:https://www.firebase.com/docs/web/guide/retrieving-data.html#section-queries

                推薦答案

                根據(jù)我的閱讀 這里,這樣做的方法是執(zhí)行第一個查詢(最好是返回最少結(jié)果的那個),然后在javascript中按另一個字段過濾.另一種方法,如果您經(jīng)常執(zhí)行此查詢,我建議您這樣做,是為查詢創(chuàng)建一個復合索引,例如;上面鏈接中 Frank van Puffelen 的回答舉了一個例子.

                From what I've read here, the way to do this is to perform the first query (preferably the one that will return the fewest results), then filter by the other field in javascript. Another way to do this, and I'd recommend this if you are performing this query often, is create a compound index for the query like; the answer by Frank van Puffelen in the link above gives an example of this.

                products/
                     product1
                        /author: 12345
                        /title: "Awesome"
                        /category: "catA"
                        /description: "more awesome"
                        /author_category: "12345_catA"
                     product2
                        /author: 67890
                        /title: "Other"
                        /category: "catB"
                        /description: "otherawesome"
                        /author_category: "67890_catB"
                     product3
                        /author: 12345
                        /title: "Billy"
                        /category: "catB"
                        /description: "otherawesome"
                        /author_category: "12345_catB"
                

                至于或",我已經(jīng)找了很長時間,但沒有找到對您有幫助的東西.我建議兩個單獨的查詢.

                As for the 'OR', I've looked for quite a while and found nothing to help you. I'd suggest two separate queries.

                這篇關于在 Firebase 中過濾多個子屬性的產(chǎn)品的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Use IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
                anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 項目中不起作用)
                Ionic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用異步數(shù)據(jù)更新 Observable)
                Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
                In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何創(chuàng)建使用 Ionic 組件的自定義指令?)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態(tài)元素 - Angular 2 amp;離子2)
                  <tfoot id='aBBbB'></tfoot>

                    <small id='aBBbB'></small><noframes id='aBBbB'>

                    <i id='aBBbB'><tr id='aBBbB'><dt id='aBBbB'><q id='aBBbB'><span id='aBBbB'><b id='aBBbB'><form id='aBBbB'><ins id='aBBbB'></ins><ul id='aBBbB'></ul><sub id='aBBbB'></sub></form><legend id='aBBbB'></legend><bdo id='aBBbB'><pre id='aBBbB'><center id='aBBbB'></center></pre></bdo></b><th id='aBBbB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='aBBbB'><tfoot id='aBBbB'></tfoot><dl id='aBBbB'><fieldset id='aBBbB'></fieldset></dl></div>
                  1. <legend id='aBBbB'><style id='aBBbB'><dir id='aBBbB'><q id='aBBbB'></q></dir></style></legend>
                      <bdo id='aBBbB'></bdo><ul id='aBBbB'></ul>

                        <tbody id='aBBbB'></tbody>

                          主站蜘蛛池模板: 在线免费观看成年人视频 | 天天看天天摸天天操 | 91精品久久久久久久久久入口 | 国产精品av久久久久久久久久 | 日韩欧美第一页 | 午夜一区 | 91视视频在线观看入口直接观看 | 精品欧美一区二区三区免费观看 | av资源中文在线天堂 | 国产91精品久久久久久久网曝门 | 精品久久久久久久久久久久久久 | 亚洲综合网站 | 成人在线免费观看视频 | 久久久久久久久久久久一区二区 | 精品影院| 日韩精品一二三 | 国产精品永久 | 人人干人人艹 | 麻豆成人在线视频 | 成人a免费 | 久久精品免费观看 | 日韩综合网 | 国产激情网站 | 天天干天天谢 | 国产精品视频观看 | 久热9 | 高清人人天天夜夜曰狠狠狠狠 | 久久夜视频 | 久久av在线播放 | 欧美在线视频网 | 97国产在线观看 | 91亚洲国产成人久久精品网站 | 9色网站| 青青草华人在线视频 | 亚洲第1页 | 欧美精品在欧美一区二区少妇 | 国产亚洲精品久久久久久牛牛 | 久草网址| 在线一级片| 亚洲精品电影在线 | 国产精品欧美一区二区三区 |