久久久久久久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 中過濾多個子屬性的產品

      Filter products on multiple child properties in Firebase(在 Firebase 中過濾多個子屬性的產品)
        <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 中過濾多個子屬性的產品的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

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

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

                作為回顧,我的結構如下所示:

                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 的所有產品,我們可以簡單地使用:

                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 的所有產品(返回 product1)

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

                作者為 12345 或作者 67890 的所有產品(返回 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

                推薦答案

                根據我的閱讀 這里,這樣做的方法是執行第一個查詢(最好是返回最少結果的那個),然后在javascript中按另一個字段過濾.另一種方法,如果您經常執行此查詢,我建議您這樣做,是為查詢創建一個復合索引,例如;上面鏈接中 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"
                

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

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

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

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

                相關文檔推薦

                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 - 使用異步數據更新 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 中,如何創建使用 Ionic 組件的自定義指令?)
                Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(將 ViewChild 用于動態元素 - 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>

                          主站蜘蛛池模板: 小草久久久久久久久爱六 | 欧美另类视频在线 | 在线观看黄视频 | 日韩成人免费视频 | 911网站大全在线观看 | 欧美aⅴ | 人人干人人干人人干 | 成人免费区一区二区三区 | 美女视频黄色片 | 亚洲不卡av在线 | av电影手机在线看 | av网站免费在线观看 | 亚洲国产精品一区在线观看 | 美女视频黄色的 | 一级欧美 | 国产极品粉嫩美女呻吟在线看人 | 波多野结衣一区二区三区在线观看 | 久久免费精品视频 | 国产在线观看网站 | 成人在线视频一区二区三区 | 亚洲视频免费播放 | 最新一级毛片 | 久久综合久| 国产一级毛片视频 | 自拍视频网站 | 美日韩免费视频 | 亚洲精品成人 | 色嗨嗨| 久久久久中文字幕 | 亚洲视频免费一区 | 国产精品一区二区三级 | 国产精品免费在线 | 97精品国产97久久久久久免费 | 久国久产久精永久网页 | h肉视频 | 99精品国产一区二区三区 | 午夜丁香视频在线观看 | 久久人人网| 日韩精品在线视频免费观看 | 久久久久成人精品 | 国产性网 |