예제 #1
0
 protected bool Equals(DynamoId other)
 {
     return(Equals(Hash, other.Hash) && Equals(Range, other.Range));
 }
예제 #2
0
 public T DeleteItem <T>(DynamoId id, ReturnItem returnItem = ReturnItem.None)
 {
     return(id.Range != null
         ? DeleteItem <T>(id.Hash, id.Range, returnItem)
         : DeleteItem <T>(id.Hash, returnItem));
 }
예제 #3
0
 public virtual Dictionary <string, AttributeValue> ToAttributeKeyValue(IPocoDynamo db, DynamoMetadataType table, DynamoId id)
 {
     using (AwsClientUtils.GetJsScope())
     {
         return(new Dictionary <string, AttributeValue> {
             { table.HashKey.Name, ToAttributeValue(db, table.HashKey.Type, table.HashKey.DbType, id.Hash) },
             { table.RangeKey.Name, ToAttributeValue(db, table.RangeKey.Type, table.RangeKey.DbType, id.Range) },
         });
     }
 }
예제 #4
0
 public T GetItem <T>(DynamoId id)
 {
     return(id.Range != null
         ? GetItem <T>(id.Hash, id.Range)
         : GetItem <T>(id.Hash));
 }
예제 #5
0
 public static T GetItem <T>(this IPocoDynamo db, DynamoId id)
 {
     return(db.GetItem <T>(id.Hash, id.Range));
 }