Amazon AWS SDK Guia de Instalação Página 84

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 151
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 83
array(
'PutRequest' => array(
'Item' => array(
'CustomerId' => array('N' => 941),
'OrderId' => array('N' => 3),
'OrderDate' => array('N' => strtotime('-1 days')),
'ItemId' => array('N' => 25336)
)
)
)
)
)
));
When you query the table with an LSI, you must specify the name of the index using the IndexName parameter.
The attributes that are returned will depend on the value of the Select parameter and on what the table is
projecting to the index. In this case 'Select' => 'COUNT' has been specified, so only the count of the items will
be returned.
// Find the number of orders made by customer 941 in the last 10 days
$result = $client->query(array(
'TableName' => 'Orders',
'IndexName' => 'OrderDateIndex',
'Select' => 'COUNT',
'KeyConditions' => array(
'CustomerId' => array(
'AttributeValueList' => array(
array('N' => '941')
),
'ComparisonOperator' => 'EQ'
),
'OrderDate' => array(
'AttributeValueList' => array(
array('N' => strtotime("-10 days"))
),
'ComparisonOperator' => 'GE'
)
)
));
$numOrders = $result['Count'];
Using the WriteRequestBatch
You can use the WriteRequestBatch if you need to write or delete many items as quickly as possible. The
WriteRequestBatch provides a high level of performance because it converts what would normally be a separate
HTTP request for each operation into HTTP requests containing up to 25 comparable requests per transaction.
If you have a large array of items you wish to add to your table, you could iterate over the them, add each item to the
batch object. After all the items are added call flush(). The batch object will automatically flush the batch and
write items to Amazon DynamoDB after hitting a customizable threshold. A final call to the batch object's flush()
method is necessary to transfer any remaining items in the queue.
$tableName = 'batch-write-test'; // This table has a HashKey named "id"
$itemIds = array();
// Put 55 items into the table
$putBatch = WriteRequestBatch::factory($client);
for ($i = 0; $i < 55; $i++) {
$itemIds[] = $itemId = uniqid();
$item = Item::fromArray(array(
Amazon DynamoDB
72
Vista de página 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 150 151

Comentários a estes Manuais

Sem comentários

Delta Electronics PMC-24V050W1AA podręczniki

Instrukcje obsługi i podręczniki użytkownika dla Narzędzia Delta Electronics PMC-24V050W1AA.
Dostarczamy 1 pdf podręczników Delta Electronics PMC-24V050W1AA do pobrania za darmo według typów dokumentów: Instrukcja Użytkownika






Więcej produktów i instrukcji dla Narzędzia Delta Electronics

Modele Rodzaj dokumentu
SMT Power Inductor SIWCM73L Instrukcja Użytkownika   Delta Electronics SMT Power Inductor SIWCM73L User Manual, 1 strony
Series H48SA Instrukcja Użytkownika   Delta Electronics Series H48SA User Manual, 14 strony
SMT Power Inductor HMU1356L Instrukcja Użytkownika   Delta Electronics SMT Power Inductor HMU1356L User Manual, 1 strony
E48SH Instrukcja Użytkownika   Delta Electronics E48SH User Manual, 15 strony
SMT Power Inductor SISN83 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor SISN83 User Manual, 1 strony
SMT Power Inductor SIA3329 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor SIA3329 User Manual, 1 strony
SMT Power Inductor HAH842 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor HAH842 User Manual, 1 strony
NC15 Series Instrukcja Użytkownika   Delta Electronics NC15 Series User Manual, 14 strony
Suppression Inductors HFZ20H Instrukcja Użytkownika   Delta Electronics Suppression Inductors HFZ20H User Manual, 1 strony
Delphi Series V48SR Instrukcja Użytkownika   Delta Electronics Delphi Series V48SR User Manual, 14 strony
SMT Power Inductor SILM315L Instrukcja Użytkownika   Delta Electronics SMT Power Inductor SILM315L User Manual, 1 strony
SMT Power Inductor SIWC1335 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor SIWC1335 User Manual, 1 strony
Ignition Coil IGT002 Instrukcja Użytkownika   Delta Electronics Ignition Coil IGT002 User Manual, 1 strony
Delphi Series DNS Instrukcja Użytkownika   Delta Electronics Delphi Series DNS User Manual [en] , 16 strony
Delta VFD-L ISO-9001 Instrukcja Użytkownika   Delta Electronics Delta VFD-L ISO-9001 User Manual, 2 strony
E48SC Instrukcja Użytkownika   Delta Electronics E48SC User Manual, 2 strony
SMT Power Inductor SIR74 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor SIR74 User Manual, 1 strony
DNQ12 Instrukcja Użytkownika   Delta Electronics DNQ12 User Manual, 12 strony
SMT Power Inductor HAH1365 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor HAH1365 User Manual, 1 strony
SMT Power Inductor HMU1055 Instrukcja Użytkownika   Delta Electronics SMT Power Inductor HMU1055 User Manual, 1 strony