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

      <legend id='pFVDu'><style id='pFVDu'><dir id='pFVDu'><q id='pFVDu'></q></dir></style></legend>
      • <bdo id='pFVDu'></bdo><ul id='pFVDu'></ul>

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

      1. 如何检查dynamodb中的字符串集中是否存在字符串

        How to check a string exist in string set in dynamodb(如何检查dynamodb中的字符串集中是否存在字符串)
        <i id='bvm8U'><tr id='bvm8U'><dt id='bvm8U'><q id='bvm8U'><span id='bvm8U'><b id='bvm8U'><form id='bvm8U'><ins id='bvm8U'></ins><ul id='bvm8U'></ul><sub id='bvm8U'></sub></form><legend id='bvm8U'></legend><bdo id='bvm8U'><pre id='bvm8U'><center id='bvm8U'></center></pre></bdo></b><th id='bvm8U'></th></span></q></dt></tr></i><div id='bvm8U'><tfoot id='bvm8U'></tfoot><dl id='bvm8U'><fieldset id='bvm8U'></fieldset></dl></div>
      2. <small id='bvm8U'></small><noframes id='bvm8U'>

            <tfoot id='bvm8U'></tfoot>
              <tbody id='bvm8U'></tbody>
            • <bdo id='bvm8U'></bdo><ul id='bvm8U'></ul>

                <legend id='bvm8U'><style id='bvm8U'><dir id='bvm8U'><q id='bvm8U'></q></dir></style></legend>

                1. 本文介绍了如何检查dynamodb中的字符串集中是否存在字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在表中的每个项目中都设置了一个字符串.例如,

                  I have a string set in each item in my table. For example,

                  {                                        
                     Title = "Book 101 Title"
                     ISBN = "111-1111111111"
                     Authors = "Author 1"
                     Price = -2
                     Dimensions = "8.5 x 11.0 x 0.5"
                     PageCount = 500
                     Color = [ "Red", "Black" ]
                     ProductCategory = "Book" 
                  }
                  
                  
                  {                                        
                     Title = "Book 102 Title"
                     ISBN = "222-222222222"
                     Authors = "Author 2"
                     Price = -8
                     Dimensions = "8.5 x 11.0 x 0.5"
                     PageCount = 700
                     Color = [ "Red", "Green" ]
                     ProductCategory = "Book" 
                  }
                  

                  使用 dynamoDB php sdk,我想获得红色"颜色的项目.我试试这样.

                  With dynamoDB php sdk, I want to get items which is "Red" color. I try like this.

                  $response = $client->query(array(
                      "TableName" => $tablename,
                      "KeyConditions" => array(
                          "ComparisonOperator" => ComparisonOperator::CONTAINS,
                          'Color' => array(
                              'AttributeValueList' => array(
                                  array(Type::STRING_SET => array("Red"))
                          ),
                       )
                  ));
                  

                  但我遇到了这样的错误.

                  But I got an error like that.

                  ValidationException: One or more parameter values were invalid: ComparisonOperator CONTAINS is not valid for SS AttributeValue type
                  

                  推荐答案

                  我从 aws 开发者论坛找到了一个解决方案 这里.不能将 CONTAINSquery 一起使用.必须与 scan 一起使用.就这样.

                  I found a solution from aws developer forum here. Can't use CONTAINS with query. Have to use it with scan. Like that.

                  $response = $client->scan(array(
                      "TableName" => $tablename,
                      "KeyConditions" => array(
                          "ComparisonOperator" => ComparisonOperator::CONTAINS,
                          'Color' => array(
                              'AttributeValueList' => array(
                                  array(Type::STRING => "Red")
                          ),
                       )
                  ));
                  

                  这篇关于如何检查dynamodb中的字符串集中是否存在字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How do I parse XML containing custom namespaces using SimpleXML?(如何使用 SimpleXML 解析包含自定义命名空间的 XML?)
                  SimpleXML SOAP response Namespace issues(SimpleXML SOAP 响应命名空间问题)
                  Problems with PHP namespaces and built-in classes, how to fix?(PHP 命名空间和内置类的问题,如何解决?)
                  Use php namespace inside function(在函数内部使用 php 命名空间)
                  unexpected #39;use#39; (T_USE) when trying to use composer(尝试使用作曲家时意外的“使用(T_USE))
                  PHP adding custom namespace using autoloader from composer(PHP使用来自作曲家的自动加载器添加自定义命名空间)

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

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

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