pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

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

    <legend id='MtBkQ'><style id='MtBkQ'><dir id='MtBkQ'><q id='MtBkQ'></q></dir></style></legend>
      <bdo id='MtBkQ'></bdo><ul id='MtBkQ'></ul>
    <tfoot id='MtBkQ'></tfoot>

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

        在非關(guān)鍵屬性上查詢 DynamoDB

        Querying DynamoDB on non-key attributes(在非關(guān)鍵屬性上查詢 DynamoDB)
          <tbody id='w24vs'></tbody>
      1. <tfoot id='w24vs'></tfoot>
            <bdo id='w24vs'></bdo><ul id='w24vs'></ul>

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

                  <legend id='w24vs'><style id='w24vs'><dir id='w24vs'><q id='w24vs'></q></dir></style></legend>
                1. <i id='w24vs'><tr id='w24vs'><dt id='w24vs'><q id='w24vs'><span id='w24vs'><b id='w24vs'><form id='w24vs'><ins id='w24vs'></ins><ul id='w24vs'></ul><sub id='w24vs'></sub></form><legend id='w24vs'></legend><bdo id='w24vs'><pre id='w24vs'><center id='w24vs'></center></pre></bdo></b><th id='w24vs'></th></span></q></dt></tr></i><div class="r5dndlp" id='w24vs'><tfoot id='w24vs'></tfoot><dl id='w24vs'><fieldset id='w24vs'></fieldset></dl></div>
                  本文介紹了在非關(guān)鍵屬性上查詢 DynamoDB的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  是否可以在 AWS 版本 2 中使用非關(guān)鍵屬性過(guò)濾 DynamoDB 查詢?亞馬遜表示他們可以做到:http://amzn.to/1FVgQ9B.但是他們也提供 API 嗎?我找到了 AWSDynamoDBQueryExpression,但我認(rèn)為它只允許過(guò)濾范圍鍵(沒(méi)有足夠的文檔).我正在 iOS 和 AWS 版本 2 中尋找合適的 API.謝謝!

                  Is it possible to filter DynamoDB queries using non-key attributes in AWS version 2 ? Amazon says that they can do it: http://amzn.to/1FVgQ9B. But do they also give the API? I found AWSDynamoDBQueryExpression, but I think it only lets filtering on the range key (not enough documentation). I'm looking for the proper API in iOS and AWS version 2. Thanks!

                  推薦答案

                  我正在回答我自己的問(wèn)題.這也是我在 AWS 支持論壇上發(fā)布的內(nèi)容:

                  I'm answering my own question. This is what I posted on AWS support forum as well:

                  您無(wú)法使用高級(jí) API -- AWSDynamoDBObjectMapper 來(lái)執(zhí)行此操作.使用 AWSDynamoDBObjectMapper 時(shí),需要向查詢方法提供一個(gè) AWSDynamoDBQueryExpression 對(duì)象來(lái)指定查詢條件.AWSDynamoDBQueryExpression 沒(méi)有為您提供在非關(guān)鍵屬性上設(shè)置過(guò)濾器(條件)的選項(xiàng).我想知道為什么不支持這個(gè)!但是,AWSDynamoDBScanExpression 允許您在使用掃描方法時(shí)指定非關(guān)鍵屬性的條件.但是,當(dāng)您真正的意思是查詢時(shí),您不想掃描.

                  You can't do this with the high level API -- AWSDynamoDBObjectMapper. When using AWSDynamoDBObjectMapper, you need to provide an AWSDynamoDBQueryExpression object to the query method to specify the query conditions. AWSDynamoDBQueryExpression doesn't give you the option to set filters(conditions) on non-key attributes. I wonder why this isn't supported! However, AWSDynamoDBScanExpression lets you specify conditions on non-key attributes when you use the scan method. But you don't want to scan when you actually mean a query.

                  幸運(yùn)的是,您可以使用低級(jí)別 API 執(zhí)行此操作,方法是直接在 AWSDynamoDB 上調(diào)用查詢,提供 AWSDynamoDBQueryInput,讓您可以指定許多低級(jí)別參數(shù).AWSDynamoDBQueryInput 允許您使用 queryFilter 或 filterExpression 指定非鍵屬性的過(guò)濾條件.不推薦使用 queryFilter,建議使用 filterExpression.以下是幫助我解決這個(gè)問(wèn)題的兩個(gè)文件:

                  Fortunately, you can do this using the low level API by directly calling query on AWSDynamoDB providing an AWSDynamoDBQueryInput which lets you specify a lot of low level parameters. AWSDynamoDBQueryInput lets you specify the filter conditions on non-key attributes using either queryFilter or filterExpression. queryFilter is deprecated, it's recommended to use filterExpression. Here are the two documents that helped me to figure this out:

                  http://docs.aws.amazon.com/amazondynamodb/最新/APIReference/API_Query.htmlhttp://docs.aws.amazon.com/AWSiOSSDK/latest/Classes/AWSDynamoDBQueryInput.html

                  這是 swift 中的代碼示例.在此代碼中,我基于作為非關(guān)鍵屬性的已批準(zhǔn)"字段進(jìn)行過(guò)濾.recId 為主鍵:

                  Here's a code example in swift. In this code I'm filtering based on "approved" field that is a non-key attribute. recId is the primary key:

                      func getApprovedRecords(recId: Int) {
                  
                  
                  
                       let dynamoDB = AWSDynamoDB.defaultDynamoDB()
                  
                          var startKey = nil
                  
                          var queryInput = AWSDynamoDBQueryInput()
                  
                          queryInput.tableName = TABLE_NAME
                  
                          queryInput.limit = QUERY_SIZE
                  
                          queryInput.exclusiveStartKey = startKey
                  
                  
                  
                          var recIdValue = AWSDynamoDBAttributeValue()
                  
                          recIdValue.N = String(recId)
                  
                          var recIdCondition = AWSDynamoDBCondition()
                  
                          recIdCondition.comparisonOperator = AWSDynamoDBComparisonOperator.EQ
                  
                          recIdCondition.attributeValueList = [recIdValue]
                  
                  
                  
                          queryInput.keyConditions = [ "recId"" : recIdCondition]
                  
                  
                          var oneValue = AWSDynamoDBAttributeValue()
                  
                          oneValue.N = "1"
                  
                  
                  
                          queryInput.expressionAttributeValues = [ ":one" : oneValue ]    
                  
                          queryInput.filterExpression = "approved = :one"
                  
                          dynamoDB.query(queryInput).continueWithBlock { (task: BFTask!) -> AnyObject! in
                  
                              if ((task.error) != nil) {
                  
                                  NSLog("The request failed. Error: (task.error)")
                  
                              }
                  
                              if ((task.exception) != nil) {
                  
                                  NSLog("The request failed. Exception: (task.exception)")
                  
                              }
                  
                              if ((task.result) != nil) {
                  
                                  NSLog("The request  succeeded.")
                  
                                  let results = task.result as! AWSDynamoDBQueryOutput
                  
                                  for r in results.items {
                  
                                      // do whatever with the result
                  
                                  }
                  
                              }
                  
                              return nil
                  
                          }
                  
                      }
                  

                  這篇關(guān)于在非關(guān)鍵屬性上查詢 DynamoDB的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  CLLocation returning negative speed(CLLocation 返回負(fù)速度)
                  Locations in Core Data sorted by distance via NSFetchedResultsController?(通過(guò) NSFetchedResultsController 按距離排序的核心數(shù)據(jù)中的位置?)
                  Swift: Geofencing / geolocations near user location(Swift:用戶位置附近的地理圍欄/地理位置)
                  How to get Location (latitude amp; longitude value) in variable on iOS?(如何在 iOS 上的變量中獲取位置(緯度和經(jīng)度值)?)
                  How to track the device location (iOS and Android) device using Phonegap(如何使用 Phonegap 跟蹤設(shè)備位置(iOS 和 Android)設(shè)備)
                  Easiest way of getting reverse geocoded current location from iOS(從 iOS 獲取反向地理編碼當(dāng)前位置的最簡(jiǎn)單方法)
                    <i id='hpdmt'><tr id='hpdmt'><dt id='hpdmt'><q id='hpdmt'><span id='hpdmt'><b id='hpdmt'><form id='hpdmt'><ins id='hpdmt'></ins><ul id='hpdmt'></ul><sub id='hpdmt'></sub></form><legend id='hpdmt'></legend><bdo id='hpdmt'><pre id='hpdmt'><center id='hpdmt'></center></pre></bdo></b><th id='hpdmt'></th></span></q></dt></tr></i><div class="nznj5b5" id='hpdmt'><tfoot id='hpdmt'></tfoot><dl id='hpdmt'><fieldset id='hpdmt'></fieldset></dl></div>

                      1. <legend id='hpdmt'><style id='hpdmt'><dir id='hpdmt'><q id='hpdmt'></q></dir></style></legend>
                          <bdo id='hpdmt'></bdo><ul id='hpdmt'></ul>
                          <tfoot id='hpdmt'></tfoot>
                              <tbody id='hpdmt'></tbody>

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

                            主站蜘蛛池模板: PE一体化污水处理设备_地埋式生活污水净化槽定制厂家-岩康塑业 | 泰国试管婴儿_泰国第三代试管婴儿_泰国试管婴儿费用/多少钱_孕泰来 | 铸钢件厂家-铸钢齿轮-减速机厂家-淄博凯振机械有限公司 | 工业冷却塔维修厂家_方形不锈钢工业凉水塔维修改造方案-广东康明节能空调有限公司 | 冷热冲击试验箱_温度冲击试验箱价格_冷热冲击箱排名_林频厂家 | 高空重型升降平台_高空液压举升平台_高空作业平台_移动式升降机-河南华鹰机械设备有限公司 | 心肺复苏模拟人|医学模型|急救护理模型|医学教学模型上海康人医学仪器设备有限公司 | 冷轧机|两肋冷轧机|扁钢冷轧机|倒立式拉丝机|钢筋拔丝机|收线机-巩义市华瑞重工机械制造有限公司 | 专业生产动态配料系统_饲料配料系统_化肥配料系统等配料系统-郑州鑫晟重工机械有限公司 | 微学堂-电动能源汽车评测_电动车性能分享网| 【电子厂招聘_普工招工网_工厂招聘信息平台】-工立方打工网 | atcc网站,sigma试剂价格,肿瘤细胞现货,人结肠癌细胞株购买-南京科佰生物 | 仓储货架_南京货架_钢制托盘_仓储笼_隔离网_环球零件盒_诺力液压车_货架-南京一品仓储设备制造公司 | 合肥防火门窗/隔断_合肥防火卷帘门厂家_安徽耐火窗_良万消防设备有限公司 | 缠膜机|缠绕包装机|无纺布包装机-济南达伦特机械设备有限公司 | 布袋除尘器|除尘器设备|除尘布袋|除尘设备_诺和环保设备 | 气动隔膜阀_气动隔膜阀厂家_卫生级隔膜阀价格_浙江浙控阀门有限公司 | 焊管生产线_焊管机组_轧辊模具_焊管设备_焊管设备厂家_石家庄翔昱机械 | 致胜管家软件服务【在线免费体验】| 橡胶膜片,夹布膜片,橡胶隔膜密封,泵阀设备密封膜片-衡水汉丰橡塑科技公司网站 | 灌装封尾机_胶水灌装机_软管灌装封尾机_无锡和博自动化机械制造有限公司 | 三效蒸发器_多效蒸发器价格_四效三效蒸发器厂家-青岛康景辉 | 沈阳楼承板_彩钢板_压型钢板厂家-辽宁中盛绿建钢品股份有限公司 轴承振动测量仪电箱-轴承测振动仪器-测试仪厂家-杭州居易电气 | 针焰试验仪,灼热丝试验仪,漏电起痕试验仪,水平垂直燃烧试验仪 - 苏州亚诺天下仪器有限公司 | 浙江红酒库-冰雕库-气调库-茶叶库安装-医药疫苗冷库-食品物流恒温恒湿车间-杭州领顺实业有限公司 | 网站建设-网站制作-网站设计-网站开发定制公司-网站SEO优化推广-咏熠软件 | 全自动端子机|刺破式端子压接机|全自动双头沾锡机|全自动插胶壳端子机-东莞市傅氏兄弟机械设备有限公司 | 亮化工程,亮化设计,城市亮化工程,亮化资质合作,长沙亮化照明,杰奥思【官网】 | 渣油泵,KCB齿轮泵,不锈钢齿轮泵,重油泵,煤焦油泵,泊头市泰邦泵阀制造有限公司 | 重庆LED显示屏_显示屏安装公司_重庆LED显示屏批发-彩光科技公司 重庆钣金加工厂家首页-专业定做监控电视墙_操作台 | 广州/东莞小字符喷码机-热转印打码机-喷码机厂家-广州瑞润科技 | 薪动-人力资源公司-灵活用工薪资代发-费用结算-残保金优化-北京秒付科技有限公司 | 首页_欧瑞传动官方网站--主营变频器、伺服系统、新能源、软起动器、PLC、HMI | 磁粉制动器|张力控制器|气胀轴|伺服纠偏控制器整套厂家--台灵机电官网 | 物流之家新闻网-最新物流新闻|物流资讯|物流政策|物流网-匡匡奈斯物流科技 | 蜜蜂职场文库_职场求职面试实用的范文资料大全 | 开云(中国)Kaiyun·官方网站-登录入口 | 洁净化验室净化工程_成都实验室装修设计施工_四川华锐净化公司 | 行业分析:提及郑州火车站附近真有 特殊按摩 ?2025实地踩坑指南 新手如何避坑不踩雷 | 震动筛选机|震动分筛机|筛粉机|振筛机|振荡筛-振动筛分设备专业生产厂家高服机械 | ISO9001认证咨询_iso9001企业认证代理机构_14001|18001|16949|50430认证-艾世欧认证网 |