Amazon AWS SDK Uživatelská příručka Strana 64

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 155
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 63
else if (value.SS.Count > 0)
{
Console.Write("{0}", string.Join("\n", value.SS.ToArray()));
}
// Otherwise, boolean value.
else
{
Console.Write(value.BOOL);
}
Console.Write("\n");
}
In the preceding example, each attribute value has several data-type-specific properties that can be
evaluated to determine the correct format to print the attribute. These properties include properties such
as B, BOOL, BS, L, M, N, NS, NULL, S, and SS, which correspond to those in the JSON Data Format. For
properties such as B, N, NULL, and S, if the corresponding property is not null, then the attribute is of
the corresponding non-null data type. For properties such as BS, L, M, NS, and SS, if Count is greater
than zero, then the attribute is of the corresponding non-zero-value data type. If all of the attribute's
data-type-specific properties are either null or the Count equals zero, then the attribute corresponds
to the BOOL data type.
Create or Replace an Item by Using Expressions
The following example features the Amazon.DynamoDBv2.AmazonDynamoDBClient.PutItem method
and a set of expressions to update the item that has a Title of 18-Bicycle 301. If the item doesn't
already exist, a new item is added.
// using Amazon.DynamoDBv2;
// using Amazon.DynamoDBv2.Model;
var client = new AmazonDynamoDBClient();
var request = new PutItemRequest
{
TableName = "ProductCatalog",
ExpressionAttributeNames = new Dictionary<string, string>
{
{ "#title", "Title" }
},
ExpressionAttributeValues = new Dictionary<string, AttributeValue>
{
{ ":product", new AttributeValue { S = "18-Bicycle 301" } }
},
ConditionExpression = "#title = :product",
// CreateItemData() is a custom function.
Item = CreateItemData()
};
client.PutItem(request);
In the preceding example, the ExpressionAttributeNames property specifies the placeholder #title
to represent the Title attribute.The ExpressionAttributeValues property specifies the placeholder
:product to represent the value 18-Bicycle 301.The ConditionExpression property specifies
that #title (Title) must be equal to :product (18-Bicycle 301). The call to CreateItemData
refers to the following custom function:
Version v2.0.0
60
AWS SDK for .NET Developer Guide
Using Expressions with DynamoDB
Zobrazit stránku 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 154 155

Komentáře k této Příručce

Žádné komentáře

Powermate 024-0078CT manuály

Uživatelské manuály a uživatelské příručky pro Elektrické nářadí Powermate 024-0078CT.
Poskytujeme 1 manuály pdf Powermate 024-0078CT ke stažení zdarma podle typů dokumentů: Uživatelský manuál






Další produkty a příručky pro Elektrické nářadí Powermate

Modely Typ Dokumentu
P024-0140SP Uživatelský manuál     Powermate P024-0140SP User's Manual, 16 stránky
P024-0110SP Uživatelský manuál     Powermate P024-0110SP User's Manual, 16 stránky
024-0179CT Uživatelský manuál     Powermate 024-0179CT User's Manual, 20 stránky
P024-0139SP Uživatelský manuál     Powermate P024-0139SP User's Manual, 16 stránky
024-0082CT Uživatelský manuál     Powermate 024-0082CT User's Manual, 16 stránky
024-0092CT Uživatelský manuál     Powermate 024-0092CT User's Manual, 16 stránky
P024-0101SP Uživatelský manuál     Powermate P024-0101SP User's Manual, 16 stránky
009-0002CT Uživatelský manuál     Powermate 009-0002CT User's Manual, 16 stránky
024-0175CT Uživatelský manuál     Powermate 024-0175CT User's Manual, 16 stránky
P024-0112SP Uživatelský manuál     Powermate P024-0112SP User's Manual, 16 stránky
024-0079CT Uživatelský manuál     Powermate 024-0079CT User's Manual, 16 stránky
024-0089CT Uživatelský manuál     Powermate 024-0089CT User's Manual, 16 stránky
009-0367CT Návod k použití a péči     Powermate 009-0367CT Use and Care Manual, 16 stránky