<legend id='Iqje1'><style id='Iqje1'><dir id='Iqje1'><q id='Iqje1'></q></dir></style></legend>
    1. <tfoot id='Iqje1'></tfoot>

        • <bdo id='Iqje1'></bdo><ul id='Iqje1'></ul>

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

      1. <i id='Iqje1'><tr id='Iqje1'><dt id='Iqje1'><q id='Iqje1'><span id='Iqje1'><b id='Iqje1'><form id='Iqje1'><ins id='Iqje1'></ins><ul id='Iqje1'></ul><sub id='Iqje1'></sub></form><legend id='Iqje1'></legend><bdo id='Iqje1'><pre id='Iqje1'><center id='Iqje1'></center></pre></bdo></b><th id='Iqje1'></th></span></q></dt></tr></i><div id='Iqje1'><tfoot id='Iqje1'></tfoot><dl id='Iqje1'><fieldset id='Iqje1'></fieldset></dl></div>

        有没有办法在 DynamoDB 中查询多个哈希键?

        Is there a way to query multiple hash keys in DynamoDB?(有没有办法在 DynamoDB 中查询多个哈希键?)

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

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

          1. <tfoot id='cPO9h'></tfoot>

            • <legend id='cPO9h'><style id='cPO9h'><dir id='cPO9h'><q id='cPO9h'></q></dir></style></legend>
                <tbody id='cPO9h'></tbody>
                <bdo id='cPO9h'></bdo><ul id='cPO9h'></ul>
                  本文介绍了有没有办法在 DynamoDB 中查询多个哈希键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有没有办法在亚马逊的 AWS SDK for Java 中使用单个查询来查询多个哈希键?

                  Is there a way to query multiple hash keys using a single query in Amazon's AWS SDK for Java?

                  这是我的问题;我有一个项目状态的数据库表.哈希键是项目的状态(即:新建、分配、处理或完成).范围键是一组项目 ID.目前,我有一个查询设置来简单地查找列为已分配"状态(哈希)的所有项目和另一个查询设置来查找处理"状态.有没有办法使用单个查询来执行此操作,而不是为我需要查找的每个状态发送多个查询?代码如下:

                  Here's my issue; I have a DB table for project statuses. The Hash Key is the status of a project (ie: new, assigned, processing, or complete). The range key is a set of project IDs. Currently, I've got a query setup to simply find all the projects listed as a status(hash) of "assigned" and another query set to look for a status of "processing". Is there a way to do this using a single query rather than sending multiple queries for each status I need to find? Code below:

                      DynamoDBMapper mapper = new DynamoDBMapper(new AmazonDynamoDBClient(credentials));
                      PStatus assignedStatus = new PStatus();
                      assignedStatus.setStatus("assigned");
                      PStatus processStatus = new PStatus();
                      processStatus.setStatus("processing");
                  
                      DynamoDBQueryExpression<PStatus> queryAssigned = new DynamoDBQueryExpression<PStatus>().withHashKeyValues(assignedStatus);
                      DynamoDBQueryExpression<PStatus> queryProcessing = new DynamoDBQueryExpression<PStatus>().withHashKeyValues(processStatus);
                  
                      List<PStatus> assigned = mapper.query(PStatus.class, queryAssigned);
                      List<PStatus> process = mapper.query(PStatus.class, queryProcessing);
                  

                  所以基本上,我想知道是否可以消除 queryAssignedassigned 变量并同时处理 assignedStatusprocessStatus 通过相同的查询 process 来查找不是新的或不完整的项目.

                  So basically, I'd like to know if it's possible to eliminate the queryAssigned and assigned variables and handle both assignedStatus and processStatus via the same query, process, to find projects that are not new or complete.

                  推荐答案

                  不,截至目前,无法在同一个请求中发送多个查询.如果您担心延迟,您可以在不同的线程中同时发出多个请求.如果 Dynamo 提供它,这将需要与双重查询"相同数量的网络带宽(假设您制作 2 个,而不是数百个).

                  No, as of today there is no way to send multiple queries in the same request. If you're concerned about latency, you could make multiple requests simultaneously in different threads. This would require the same amount of network bandwidth as a "dual query" would if Dynamo offered it (assuming you're making 2, not hundreds).

                  这篇关于有没有办法在 DynamoDB 中查询多个哈希键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                  How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                  KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                  How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                  How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                  Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)

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

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

                      <tbody id='yznov'></tbody>
                        1. <tfoot id='yznov'></tfoot>

                            <bdo id='yznov'></bdo><ul id='yznov'></ul>