根据firebase中的多个条件获取记录

时间:2016-09-30 12:55:15

标签: firebase firebase-realtime-database

 [ {
"categories" : [ {
"id" : 0
 }, {
  "id" : 1
  } ],
    "height" : "134",
   "image" : 2,
    "is_active" : "1",
   "layer_count" : "3",
   "name" : "1",
    "symbol_keywords" : [ {
  "keyword_id" : 10
  }, null, null, {
  "keyword_id" : 13
   }, {
  "keyword_id" : 14
  }, {
  "keyword_id" : 15
   } ],
   "symbol_layers" : [ {
  "cmyk" : "0,0,0,70",
  "height" : "71",
  "hexa" : "706F6F",
  "layer" : "1",
  "rgb" : "112,111,111",
  "symbol_id" : "1",
  "width" : "126",
   "xpos" : "107",
  "ypos" : "59"
   }, {
  "cmyk" : "0,70,20,0",
  "height" : "66",
  "hexa" : "ED6D91",
  "layer" : "2",
  "rgb" : "237,109,145",
  "symbol_id" : "1",
   "width" : "66",
  "xpos" : "158",
  "ypos" : "59"
   }, {
  "cmyk" : "0,80,40,0",
   "height" : "12",
   "hexa" : "EA516D",
  "layer" : "3",
  "rgb" : "234,81,109",
  "symbol_id" : "1",
  "width" : "15",
   "xpos" : "110",
   "ypos" : "78"
   } ],
   "symbol_text" : [ {
   "align" : "center",
   "bold" : "0",
   "cmyk" : "0,80,40,0",
  "color" : "EA516D",
  "font" : "gabrielle",
  "height" : "48",
  "italic" : "0",
  "line" : "CompanyName",
  "rgb" : "234,81,109",
  "size" : "75",
  "text" : "1",
  "underline" : "0",
   "width" : "400",
  "xpos" : "0",
  "ypos" : "160"
   }, {
 "align" : "center",
  "bold" : "0",
  "cmyk" : "0,0,0,70",
   "color" : "706F6F",
    "font" : "quicksand_book",
    "height" : "35",
     "italic" : "0",
    "line" : "YOUR SLOGAN",
    "rgb" : "112,111,111",
    "size" : "20",
    "text" : "2",
      "underline" : "0",
    "width" : "400",
    "xpos" : "0",
    "ypos" : "244"
   } ],
 "variant_of" : "0",
 "weightage" : "75",
 "width" : "239",
 "xpos" : "100",
 "ypos" : "40"
  }, {
 "categories" : [ {
  "2" : {
  "id" : 2
  }
  }, {
  "3" : {
  "id" : 3
   }
  } ],
   "height" : "134",
  "image" : "1",
  "is_active" : "1",
  "layer_count" : "3",
  "name" : "1",
  "symbol_keywords" : [ {
  "keyword_id" : 0
  }, {
  "keyword_id" : 11
  }, {
  "keyword_id" : 21
   }, {
  "keyword_id" : 31
    }, {
  "keyword_id" : 41
  }, {
  "keyword_id" : 51
 } ],
  "symbol_layers" : [ {
  "cmyk" : "0,0,0,70",
   "height" : "71",
  "hexa" : "706F6F",
   "layer" : "1",
  "rgb" : "112,111,111",
  "symbol_id" : "1",
  "width" : "126",
  "xpos" : "107",
  "ypos" : "59"
   }, {
   "cmyk" : "0,70,20,0",
   "height" : "66",
  "hexa" : "ED6D91",
  "layer" : "2",
  "rgb" : "237,109,145",
    "symbol_id" : "1",
     "width" : "66",
   "xpos" : "158",
   "ypos" : "59"
    }, {
   "cmyk" : "0,80,40,0",
   "height" : "12",
   "hexa" : "EA516D",
   "layer" : "3",
   "rgb" : "234,81,109",
   "symbol_id" : "1",
   "width" : "15",
    "xpos" : "110",
   "ypos" : "78"
     } ],
    "symbol_text" : [ {
   "align" : "center",
   "bold" : "0",
   "cmyk" : "0,80,40,0",
   "color" : "EA516D",
   "font" : "gabrielle",
   "height" : "48",
    "italic" : "0",
   "line" : "CompanyName",
   "rgb" : "234,81,109",
   "size" : "75",
   "text" : "1",
   "underline" : "0",
   "width" : "400",
   "xpos" : "0",
    "ypos" : "160"
      }, {
   "align" : "center",
   "bold" : "0",
   "cmyk" : "0,0,0,70",
   "color" : "706F6F",
   "font" : "quicksand_book",
   "height" : "35",
   "italic" : "0",
   "line" : "YOUR SLOGAN",
   "rgb" : "112,111,111",
   "size" : "20",
   "text" : "2",
   "underline" : "0",
   "width" : "400",
   "xpos" : "0",
   "ypos" : "244"
    } ],
    "variant_of" : "0",
   "weightage" : "75",
     "width" : "239",
    "xpos" : "100",
   "ypos" : "40"
   }, {
      "categories" : [ {
     "4" : {
     "id" : 4
     }
     }, {
   "5" : {
  "id" : 5
    }
  } ],
   "height" : "120",
  "image" : "2",
  "is_active" : "1",
  "layer_count" : "3",
 "name" : "1",
 "symbol_keywords" : [ {
   "keyword_id" : 0
  }, {
  "keyword_id" : 1
   }, {
  "keyword_id" : 2
 }, {
  "keyword_id" : 3
   }, {
   "keyword_id" : 4
  }, {
 "keyword_id" : 5
  } ],
  "symbol_layers" : [ {
  "cmyk" : "0,0,0,70",
  "height" : "71",
  "hexa" : "706F6F",
  "layer" : "1",
  "rgb" : "112,111,111",
  "symbol_id" : "1",
  "width" : "126",
  "xpos" : "107",
   "ypos" : "59"
  }, {
  "cmyk" : "0,70,20,0",
  "height" : "66",
  "hexa" : "ED6D91",
  "layer" : "2",
  "rgb" : "237,109,145",
  "symbol_id" : "1",
  "width" : "66",
  "xpos" : "158",
  "ypos" : "59"
    }, {
  "cmyk" : "0,80,40,0",
  "height" : "12",
  "hexa" : "EA516D",
  "layer" : "3",
   "rgb" : "234,81,109",
  "symbol_id" : "1",
  "width" : "15",
  "xpos" : "110",
  "ypos" : "78"
  } ],
  "symbol_text" : [ {
  "align" : "center",
  "bold" : "0",
  "cmyk" : "0,80,40,0",
  "color" : "EA516D",
  "font" : "gabrielle",
  "height" : "48",
  "italic" : "0",
  "line" : "CompanyName",
  "rgb" : "234,81,109",
  "size" : "75",
  "text" : "1",
  "underline" : "0",
  "width" : "400",
  "xpos" : "0",
  "ypos" : "160"
  }, {
   "align" : "center",
  "bold" : "0",
  "cmyk" : "0,0,0,70",
  "color" : "706F6F",
  "font" : "quicksand_book",
  "height" : "35",
  "italic" : "0",
  "line" : "YOUR SLOGAN",
  "rgb" : "112,111,111",
  "size" : "20",
  "text" : "2",
  "underline" : "0",
  "width" : "400",
  "xpos" : "0",
  "ypos" : "244"
   } ],
   "variant_of" : "0",
    "weightage" : "75",
   "width" : "239",
   "xpos" : "100",
   "ypos" : "40"
   } ]

我有这个数据库结构,其中一个符号可以有多个类别和多个symbol_keywords.Now我想根据特定的类别id和特定的keyword_id通过rest api查询符号。如果是,这可能是怎么回事?或者需要重组数据库

0 个答案:

没有答案