示例#1
0
 public void Enter(ExpressionAttributeValue attrValue)
 {
     if (_attributeValues.ContainsKey(attrValue))
     {
         _attributeValues[attrValue]++;
     }
 }
示例#2
0
 public void Leave(ExpressionAttributeValue attrValue)
 {
     if (attrValue != null && _attributeValues.ContainsKey(attrValue))
     {
         if (_attributeValues[attrValue] == 1)
         {
             _attributeValues.Remove(attrValue);
         }
         else
         {
             _attributeValues[attrValue]--;
         }
     }
 }
示例#3
0
            public SortKeyCondition AddSortKeyCondition(
                ExpressionAttributeName name,
                ExpressionAttributeValue value,
                ExpressionAttributeValue value2,
                string @operator,
                SortKeyType sortKeyType
                )
            {
                var sortKey = new SortKey
                {
                    ExpressionAttributeName   = name,
                    ExpressionAttributeValue  = value,
                    ExpressionAttributeValue2 = value2,
                    Operator    = @operator,
                    SortKeyType = sortKeyType
                };

                var sortKeyCondition = new SortKeyCondition(sortKey);

                SortKeys.Add(sortKey, sortKeyCondition);

                return(sortKeyCondition);
            }
示例#4
0
            public HashKeyCondition AddHashKeyCondition(ExpressionAttributeName attrName, ExpressionAttributeValue attrValue)
            {
                var hashKey = new HashKey
                {
                    ExpressionAttributeName  = attrName,
                    ExpressionAttributeValue = attrValue,
                };

                var hashKeyCondition = new HashKeyCondition(hashKey);

                HashKeys.Add(hashKey, hashKeyCondition);

                return(hashKeyCondition);
            }