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

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

      <tfoot id='X5K1e'></tfoot>

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

        Dynamodb 過濾器表達式不返回所有結果

        Dynamodb filter expression not returning all results(Dynamodb 過濾器表達式不返回所有結果)

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

                  <tbody id='3MJ4Z'></tbody>
              1. <small id='3MJ4Z'></small><noframes id='3MJ4Z'>

                  <i id='3MJ4Z'><tr id='3MJ4Z'><dt id='3MJ4Z'><q id='3MJ4Z'><span id='3MJ4Z'><b id='3MJ4Z'><form id='3MJ4Z'><ins id='3MJ4Z'></ins><ul id='3MJ4Z'></ul><sub id='3MJ4Z'></sub></form><legend id='3MJ4Z'></legend><bdo id='3MJ4Z'><pre id='3MJ4Z'><center id='3MJ4Z'></center></pre></bdo></b><th id='3MJ4Z'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3MJ4Z'><tfoot id='3MJ4Z'></tfoot><dl id='3MJ4Z'><fieldset id='3MJ4Z'></fieldset></dl></div>
                • 本文介紹了Dynamodb 過濾器表達式不返回所有結果的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想掃描過去 7 天的所有項目,所以我要做的是生成 7 天前的時間戳并過濾大于該值的時間戳.但此掃描返回了一些結果.

                  I want to scan all items for last 7 days, so what I do is I generate timestamp for 7 days back and filter for timestamp greater than that value. But this scan is returning a few results.

                  請參閱以下 Javascript:

                  See the following Javascript:

                  const daysBack = (days) => {
                    let date = new Date();
                    date.setDate(date.getDate() - days);
                    return date.getTime() ; 
                  }
                  
                  
                  const params = {
                    TableName: process.env.DYNAMODB_TABLE,
                    FilterExpression: "#ts > :z",
                    ExpressionAttributeNames:{
                        "#ts": "timestamp"
                    },
                    ExpressionAttributeValues: {
                        ":z": daysBack(7)
                    },
                  };
                  
                  dynamoDb.scan(params, (error, result) => {
                    // ... 
                  }
                  

                  推薦答案

                  這是因為在 SCAN 操作上 dynamoDb 只會發送 最多 1mb 的數據.如果您想要的記錄大小超過 1mb,則會自動分頁.

                  It is because on a SCAN operation dynamoDb will only send data upto 1mb only. If the records you want are of size more than 1mb automatically pagination happens.

                  如果你記錄你的結果,那么你會發現一個名為 LastEvaluatedKey 的屬性如果此屬性存在,那么您將不得不再次調用以獲取剩余數據.此調用必須遞歸實現,并且您必須在 LastEvaluatedKey 屬性不存在時停止它.

                  If you log your Result then you will find an attribute called LastEvaluatedKey if this attribute is present then you will have to make another call to get the remaining data. This call has to be implemented recursively and you have to stop it when LastEvaluatedKey attribute is not present.

                  讓我們看看這個例子,項目數據被遞歸獲取,整個數據被附加到數組中,然后發送.

                  Lets see this example where project data is been fetched recursively and the whole data is appended in the array and then send.

                  let getFromDb = function (params, callback) {
                      params.ConsistentRead = true;
                      let projectCollection = [];
                      dynamodbclient.scan(params, onQuery);
                  
                      function onQuery(err, data) {
                          const methodName = 'onQuery';
                          if (err) {
                              callback(err);
                              log.error(err, {
                                  class: className,
                                  func: methodName
                              });
                          } else {
                              for (let i = constant.LENGTH_ZERO; i < data.Items.length; i++) {
                                  projectCollection.push(data.Items[i]);
                              }
                              if (typeof data.LastEvaluatedKey !== 'undefined') {
                                  params.ExclusiveStartKey = data.LastEvaluatedKey;
                                  dynamodbclient.scan(params, onQuery);
                              } else {
                                  callback(err, projectCollection); //recursive call
                              }
                          }
                      }
                  }; 
                  

                  這篇關于Dynamodb 過濾器表達式不返回所有結果的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Check if a polygon point is inside another in leaflet(檢查一個多邊形點是否在傳單中的另一個內部)
                  Changing leaflet markercluster icon color, inheriting the rest of the default CSS properties(更改傳單標記群集圖標顏色,繼承其余默認 CSS 屬性)
                  Trigger click on leaflet marker(觸發點擊傳單標記)
                  How can I change the default loading tile color in LeafletJS?(如何更改 LeafletJS 中的默認加載磁貼顏色?)
                  Adding Leaflet layer control to sidebar(將 Leaflet 圖層控件添加到側邊欄)
                  Leaflet - get latitude and longitude of a marker inside a pop-up(Leaflet - 在彈出窗口中獲取標記的緯度和經度)

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

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

                          • <tfoot id='b8qcB'></tfoot>
                            <legend id='b8qcB'><style id='b8qcB'><dir id='b8qcB'><q id='b8qcB'></q></dir></style></legend>

                            主站蜘蛛池模板: 99久久久无码国产精品 | 国产91精品久久久久久久网曝门 | wwwxxx日本在线观看 | 91亚洲国产成人久久精品网站 | 欧美成视频 | 中文字字幕一区二区三区四区五区 | 一区二区在线免费观看 | 日本在线综合 | 牛牛热在线视频 | 久久精品小视频 | 亚洲一二三在线 | 国产电影一区二区三区爱妃记 | 最新国产在线 | 天堂在线一区 | 久久一区 | 国产精品亚洲欧美日韩一区在线 | 天天躁日日躁aaaa视频 | 欧美日韩精品免费 | 国产午夜精品一区二区三区嫩草 | 欧美aaaaaaaaaa| 欧美性a视频| 日日夜夜天天 | 色悠悠久 | 日本三级全黄三级三级三级口周 | 美女在线国产 | 欧美视频二区 | 欧美精品91爱爱 | 国产精品视频入口 | 亚洲精品视频在线播放 | 久久最新精品视频 | 毛片免费观看 | 欧美日韩久久精品 | 国产精品视频免费观看 | www.亚洲一区 | 国产精品国色综合久久 | 亚洲精品一区二区三区在线观看 | 国产激情视频网站 | 亚洲最大福利网 | 亚洲欧美日韩精品久久亚洲区 | 欧美一级毛片免费观看 | 日本黄色激情视频 |