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

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

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

      使用 Swift 3 在 DynamoDB 中保留關鍵字 ExpressionAttr

      reserved keyword ExpressionAttributeValues in DynamoDB using Swift 3(使用 Swift 3 在 DynamoDB 中保留關鍵字 ExpressionAttributeValues)

          <tbody id='A4ryQ'></tbody>

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

              <tfoot id='A4ryQ'></tfoot>
              <i id='A4ryQ'><tr id='A4ryQ'><dt id='A4ryQ'><q id='A4ryQ'><span id='A4ryQ'><b id='A4ryQ'><form id='A4ryQ'><ins id='A4ryQ'></ins><ul id='A4ryQ'></ul><sub id='A4ryQ'></sub></form><legend id='A4ryQ'></legend><bdo id='A4ryQ'><pre id='A4ryQ'><center id='A4ryQ'></center></pre></bdo></b><th id='A4ryQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='A4ryQ'><tfoot id='A4ryQ'></tfoot><dl id='A4ryQ'><fieldset id='A4ryQ'></fieldset></dl></div>
                <bdo id='A4ryQ'></bdo><ul id='A4ryQ'></ul>
              • <legend id='A4ryQ'><style id='A4ryQ'><dir id='A4ryQ'><q id='A4ryQ'></q></dir></style></legend>
                本文介紹了使用 Swift 3 在 DynamoDB 中保留關鍵字 ExpressionAttributeValues的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我能夠在沒有 :status : 接受表達式屬性值的情況下獲得響應,但是有了它,當我在 projectionExpression 行中使用 #status 時出現以下錯誤(status 是 DynamoDB 中的保留字,所以我有按 https://stackoverflow.com/a/45952329/5921575 在那里添加主題標簽):

                I am able to get a response without the :status : accept expression attribute value but with it, I get the following error when I am using the #status in the projectionExpression line (status is a reserved word in DynamoDB so I had to add hashtag there per https://stackoverflow.com/a/45952329/5921575):

                Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=0 "(null)" 
                UserInfo={__type=com.amazon.coral.validate#ValidationException, 
                message=Value provided in ExpressionAttributeValues unused in expressions: keys: {:status}}
                

                代碼如下:

                queryExpression.keyConditionExpression = "#userId= :userId"
                queryExpression.expressionAttributeNames = ["#userId":"userId", "#status":"status"]
                queryExpression.expressionAttributeValues = [":userId":userID, ":status":"accept"]
                queryExpression.projectionExpression = "#status"
                

                我可以不用 ":status":"accept" 但我不想得到很多沒有接受值的項目.我在此鏈接或 stackoverflow 上的任何地方都找不到答案:http://docs.aws.amazon.com/amazondynamodb/最新/developerguide/Expressions.ExpressionAttributeNames.html

                I can go without the ":status":"accept" but I do not want to get a lot of items that do not have the accept value. I can't find an answer in this link or anywhere on stackoverflow: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html

                謝謝!

                推薦答案

                有點晚了,但是:你的投影表達式不應該是#status",而是另一個不是狀態的詞.Status 是保留字,所以不要將它用于投影表達式.有關需要使用保留字時該怎么做的文檔,請參閱此處:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html#Expressions.ExpressionAttributeNames.ReservedWords

                A bit late, but: Your projection expression should not be "#status" but another word that isn't status. Status is the reserved word, so don't use that for the projection expression. See here for docs on what to do when you need to use a reserved word: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html#Expressions.ExpressionAttributeNames.ReservedWords

                另一方面,userId 不需要投影表達式,因為它不是保留字.請參閱此處獲取保留字列表:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html

                userId, on the other hand, does not require a projection expression because it is not a reserved word. See here for a list of reserved words: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html

                但是,您不需要投影表達式.您可以簡單地使用下面的代碼.定義queryExpression.expressionAttributeNames"以創建狀態屬性值的替代名稱.在這里,我使用了短語statusVal"作為替代.

                However, you don't need a projection expression. You can simply use the code below. Define "queryExpression.expressionAttributeNames" to create a substitute name for the status attribute value. Here, I used the phrase "statusVal" as a substitute.

                試試這個.(它對我有用)

                Try this. (It worked for me)

                let queryExpression = AWSDynamoDBQueryExpression()
                queryExpression.expressionAttributeNames = ["#statusVal":"status"] // Using statusVal because it is not reserved. You only need statusVal here because it is the only attribute that also happens to be an AWS reserved word.
                queryExpression.keyConditionExpression = "userId = :uId AND #statusVal = :sV"
                queryExpression.expressionAttributeValues = [
                     ":uId" : String(describing: userId),
                     ":sV" : "accept"]
                

                然后使用 AWSDynamoDBObjectMapper 執行操作!祝你好運!

                And then perform the operation using AWSDynamoDBObjectMapper! Good luck!

                這篇關于使用 Swift 3 在 DynamoDB 中保留關鍵字 ExpressionAttributeValues的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                CLLocation returning negative speed(CLLocation 返回負速度)
                Locations in Core Data sorted by distance via NSFetchedResultsController?(通過 NSFetchedResultsController 按距離排序的核心數據中的位置?)
                Swift: Geofencing / geolocations near user location(Swift:用戶位置附近的地理圍欄/地理位置)
                How to get Location (latitude amp; longitude value) in variable on iOS?(如何在 iOS 上的變量中獲取位置(緯度和經度值)?)
                How to track the device location (iOS and Android) device using Phonegap(如何使用 Phonegap 跟蹤設備位置(iOS 和 Android)設備)
                Easiest way of getting reverse geocoded current location from iOS(從 iOS 獲取反向地理編碼當前位置的最簡單方法)
                <legend id='OtaH4'><style id='OtaH4'><dir id='OtaH4'><q id='OtaH4'></q></dir></style></legend>

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

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

                            <tbody id='OtaH4'></tbody>

                        • 主站蜘蛛池模板: 天天草夜夜骑 | 久久久久国产 | ririsao久久精品一区 | 欧美在线一区二区三区 | 欧美日韩一区精品 | 天天综合网91 | 国产aⅴ爽av久久久久久久 | 成人a在线 | 黄色在线免费观看 | 久久久国产精品视频 | 久久69精品久久久久久久电影好 | 欧美一级黄色免费看 | 日韩精品 电影一区 亚洲 | 91国内精品久久 | 日本午夜精品 | 亚洲人成一区二区三区性色 | 国产免费一区二区三区最新6 | 精品在线免费观看视频 | 天天玩天天操天天干 | 91正在播放 | 中文天堂在线观看 | 成人午夜激情 | 欧美在线天堂 | 亚洲一区二区视频在线观看 | 亚洲一区二区三区四区五区中文 | 午夜精品一区二区三区在线观看 | 一级毛片视频 | 国产精品99久久久久久久久久久久 | 久久爱一区 | 羞羞的视频免费在线观看 | 午夜视频一区二区 | 一区二区三区四区av | 国产精品高| av影音资源 | 亚洲精品乱码久久久久久蜜桃91 | 亚洲精品久久久 | 91在线观看网址 | 国产精产国品一二三产区视频 | 91在线色视频 | 在线免费观看a级片 | 国产精品久久久久久婷婷天堂 |