line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Paws::DynamoDB::Query; |
3
|
1
|
|
|
1
|
|
537
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
4
|
|
|
|
|
|
|
has AttributesToGet => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); |
5
|
|
|
|
|
|
|
has ConditionalOperator => (is => 'ro', isa => 'Str'); |
6
|
|
|
|
|
|
|
has ConsistentRead => (is => 'ro', isa => 'Bool'); |
7
|
|
|
|
|
|
|
has ExclusiveStartKey => (is => 'ro', isa => 'Paws::DynamoDB::Key'); |
8
|
|
|
|
|
|
|
has ExpressionAttributeNames => (is => 'ro', isa => 'Paws::DynamoDB::ExpressionAttributeNameMap'); |
9
|
|
|
|
|
|
|
has ExpressionAttributeValues => (is => 'ro', isa => 'Paws::DynamoDB::ExpressionAttributeValueMap'); |
10
|
|
|
|
|
|
|
has FilterExpression => (is => 'ro', isa => 'Str'); |
11
|
|
|
|
|
|
|
has IndexName => (is => 'ro', isa => 'Str'); |
12
|
|
|
|
|
|
|
has KeyConditionExpression => (is => 'ro', isa => 'Str'); |
13
|
|
|
|
|
|
|
has KeyConditions => (is => 'ro', isa => 'Paws::DynamoDB::KeyConditions'); |
14
|
|
|
|
|
|
|
has Limit => (is => 'ro', isa => 'Int'); |
15
|
|
|
|
|
|
|
has ProjectionExpression => (is => 'ro', isa => 'Str'); |
16
|
|
|
|
|
|
|
has QueryFilter => (is => 'ro', isa => 'Paws::DynamoDB::FilterConditionMap'); |
17
|
|
|
|
|
|
|
has ReturnConsumedCapacity => (is => 'ro', isa => 'Str'); |
18
|
|
|
|
|
|
|
has ScanIndexForward => (is => 'ro', isa => 'Bool'); |
19
|
|
|
|
|
|
|
has Select => (is => 'ro', isa => 'Str'); |
20
|
|
|
|
|
|
|
has TableName => (is => 'ro', isa => 'Str', required => 1); |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
6323
|
use MooseX::ClassAttribute; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
class_has _api_call => (isa => 'Str', is => 'ro', default => 'Query'); |
25
|
|
|
|
|
|
|
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DynamoDB::QueryOutput'); |
26
|
|
|
|
|
|
|
class_has _result_key => (isa => 'Str', is => 'ro'); |
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
### main pod documentation begin ### |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Paws::DynamoDB::Query - Arguments for method Query on Paws::DynamoDB |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
This class represents the parameters used for calling the method Query on the |
38
|
|
|
|
|
|
|
Amazon DynamoDB service. Use the attributes of this class |
39
|
|
|
|
|
|
|
as arguments to method Query. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Query. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
As an example: |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
$service_obj->Query(Att1 => $value1, Att2 => $value2, ...); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 AttributesToGet => ArrayRef[Str|Undef] |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This is a legacy parameter. Use C<ProjectionExpression> instead. For |
55
|
|
|
|
|
|
|
more information, see AttributesToGet in the I<Amazon DynamoDB |
56
|
|
|
|
|
|
|
Developer Guide>. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 ConditionalOperator => Str |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This is a legacy parameter. Use C<FilterExpression> instead. For more |
63
|
|
|
|
|
|
|
information, see ConditionalOperator in the I<Amazon DynamoDB Developer |
64
|
|
|
|
|
|
|
Guide>. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Valid values are: C<"AND">, C<"OR"> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 ConsistentRead => Bool |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Determines the read consistency model: If set to C<true>, then the |
71
|
|
|
|
|
|
|
operation uses strongly consistent reads; otherwise, the operation uses |
72
|
|
|
|
|
|
|
eventually consistent reads. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Strongly consistent reads are not supported on global secondary |
75
|
|
|
|
|
|
|
indexes. If you query a global secondary index with C<ConsistentRead> |
76
|
|
|
|
|
|
|
set to C<true>, you will receive a C<ValidationException>. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 ExclusiveStartKey => L<Paws::DynamoDB::Key> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
The primary key of the first item that this operation will evaluate. |
83
|
|
|
|
|
|
|
Use the value that was returned for C<LastEvaluatedKey> in the previous |
84
|
|
|
|
|
|
|
operation. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The data type for C<ExclusiveStartKey> must be String, Number or |
87
|
|
|
|
|
|
|
Binary. No set data types are allowed. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 ExpressionAttributeNames => L<Paws::DynamoDB::ExpressionAttributeNameMap> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
One or more substitution tokens for attribute names in an expression. |
94
|
|
|
|
|
|
|
The following are some use cases for using C<ExpressionAttributeNames>: |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
To access an attribute whose name conflicts with a DynamoDB reserved |
101
|
|
|
|
|
|
|
word. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item * |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
To create a placeholder for repeating occurrences of an attribute name |
106
|
|
|
|
|
|
|
in an expression. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
To prevent special characters in an attribute name from being |
111
|
|
|
|
|
|
|
misinterpreted in an expression. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=back |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Use the B<#> character in an expression to dereference an attribute |
116
|
|
|
|
|
|
|
name. For example, consider the following attribute name: |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=over |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item * |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
C<Percentile> |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=back |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
The name of this attribute conflicts with a reserved word, so it cannot |
127
|
|
|
|
|
|
|
be used directly in an expression. (For the complete list of reserved |
128
|
|
|
|
|
|
|
words, see Reserved Words in the I<Amazon DynamoDB Developer Guide>). |
129
|
|
|
|
|
|
|
To work around this, you could specify the following for |
130
|
|
|
|
|
|
|
C<ExpressionAttributeNames>: |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=over |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item * |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
C<{"#P":"Percentile"}> |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=back |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
You could then use this substitution in an expression, as in this |
141
|
|
|
|
|
|
|
example: |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=over |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=item * |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
C<#P = :val> |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=back |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Tokens that begin with the B<:> character are I<expression attribute |
152
|
|
|
|
|
|
|
values>, which are placeholders for the actual value at runtime. |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
For more information on expression attribute names, see Accessing Item |
155
|
|
|
|
|
|
|
Attributes in the I<Amazon DynamoDB Developer Guide>. |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head2 ExpressionAttributeValues => L<Paws::DynamoDB::ExpressionAttributeValueMap> |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
One or more values that can be substituted in an expression. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Use the B<:> (colon) character in an expression to dereference an |
164
|
|
|
|
|
|
|
attribute value. For example, suppose that you wanted to check whether |
165
|
|
|
|
|
|
|
the value of the I<ProductStatus> attribute was one of the following: |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
C<Available | Backordered | Discontinued> |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
You would first need to specify C<ExpressionAttributeValues> as |
170
|
|
|
|
|
|
|
follows: |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
C<{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, |
173
|
|
|
|
|
|
|
":disc":{"S":"Discontinued"} }> |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
You could then use these values in an expression, such as this: |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
C<ProductStatus IN (:avail, :back, :disc)> |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
For more information on expression attribute values, see Specifying |
180
|
|
|
|
|
|
|
Conditions in the I<Amazon DynamoDB Developer Guide>. |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 FilterExpression => Str |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
A string that contains conditions that DynamoDB applies after the |
187
|
|
|
|
|
|
|
C<Query> operation, but before the data is returned to you. Items that |
188
|
|
|
|
|
|
|
do not satisfy the C<FilterExpression> criteria are not returned. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
A C<FilterExpression> does not allow key attributes. You cannot define |
191
|
|
|
|
|
|
|
a filter expression based on a partition key or a sort key. |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
A C<FilterExpression> is applied after the items have already been |
194
|
|
|
|
|
|
|
read; the process of filtering does not consume any additional read |
195
|
|
|
|
|
|
|
capacity units. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
For more information, see Filter Expressions in the I<Amazon DynamoDB |
198
|
|
|
|
|
|
|
Developer Guide>. |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=head2 IndexName => Str |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
The name of an index to query. This index can be any local secondary |
205
|
|
|
|
|
|
|
index or global secondary index on the table. Note that if you use the |
206
|
|
|
|
|
|
|
C<IndexName> parameter, you must also provide C<TableName.> |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head2 KeyConditionExpression => Str |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
The condition that specifies the key value(s) for items to be retrieved |
213
|
|
|
|
|
|
|
by the C<Query> action. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
The condition must perform an equality test on a single partition key |
216
|
|
|
|
|
|
|
value. The condition can also perform one of several comparison tests |
217
|
|
|
|
|
|
|
on a single sort key value. C<Query> can use C<KeyConditionExpression> |
218
|
|
|
|
|
|
|
to retrieve one item with a given partition key value and sort key |
219
|
|
|
|
|
|
|
value, or several items that have the same partition key value but |
220
|
|
|
|
|
|
|
different sort key values. |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
The partition key equality test is required, and must be specified in |
223
|
|
|
|
|
|
|
the following format: |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
C<partitionKeyName> I<=> C<:partitionkeyval> |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
If you also want to provide a condition for the sort key, it must be |
228
|
|
|
|
|
|
|
combined using C<AND> with the condition for the sort key. Following is |
229
|
|
|
|
|
|
|
an example, using the B<=> comparison operator for the sort key: |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
C<partitionKeyName> C<=> C<:partitionkeyval> C<AND> C<sortKeyName> C<=> |
232
|
|
|
|
|
|
|
C<:sortkeyval> |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
Valid comparisons for the sort key condition are as follows: |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=over |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=item * |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
C<sortKeyName> C<=> C<:sortkeyval> - true if the sort key value is |
241
|
|
|
|
|
|
|
equal to C<:sortkeyval>. |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=item * |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
C<sortKeyName> C<E<lt>> C<:sortkeyval> - true if the sort key value is |
246
|
|
|
|
|
|
|
less than C<:sortkeyval>. |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=item * |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
C<sortKeyName> C<E<lt>=> C<:sortkeyval> - true if the sort key value is |
251
|
|
|
|
|
|
|
less than or equal to C<:sortkeyval>. |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=item * |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
C<sortKeyName> C<E<gt>> C<:sortkeyval> - true if the sort key value is |
256
|
|
|
|
|
|
|
greater than C<:sortkeyval>. |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=item * |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
C<sortKeyName> C<E<gt>= > C<:sortkeyval> - true if the sort key value |
261
|
|
|
|
|
|
|
is greater than or equal to C<:sortkeyval>. |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
=item * |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
C<sortKeyName> C<BETWEEN> C<:sortkeyval1> C<AND> C<:sortkeyval2> - true |
266
|
|
|
|
|
|
|
if the sort key value is greater than or equal to C<:sortkeyval1>, and |
267
|
|
|
|
|
|
|
less than or equal to C<:sortkeyval2>. |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
=item * |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
C<begins_with (> C<sortKeyName>, C<:sortkeyval> C<)> - true if the sort |
272
|
|
|
|
|
|
|
key value begins with a particular operand. (You cannot use this |
273
|
|
|
|
|
|
|
function with a sort key that is of type Number.) Note that the |
274
|
|
|
|
|
|
|
function name C<begins_with> is case-sensitive. |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
=back |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
Use the C<ExpressionAttributeValues> parameter to replace tokens such |
279
|
|
|
|
|
|
|
as C<:partitionval> and C<:sortval> with actual values at runtime. |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
You can optionally use the C<ExpressionAttributeNames> parameter to |
282
|
|
|
|
|
|
|
replace the names of the partition key and sort key with placeholder |
283
|
|
|
|
|
|
|
tokens. This option might be necessary if an attribute name conflicts |
284
|
|
|
|
|
|
|
with a DynamoDB reserved word. For example, the following |
285
|
|
|
|
|
|
|
C<KeyConditionExpression> parameter causes an error because I<Size> is |
286
|
|
|
|
|
|
|
a reserved word: |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=over |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
=item * |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
C<Size = :myval> |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
=back |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
To work around this, define a placeholder (such a C<#S>) to represent |
297
|
|
|
|
|
|
|
the attribute name I<Size>. C<KeyConditionExpression> then is as |
298
|
|
|
|
|
|
|
follows: |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
=over |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=item * |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
C<#S = :myval> |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
=back |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
For a list of reserved words, see Reserved Words in the I<Amazon |
309
|
|
|
|
|
|
|
DynamoDB Developer Guide>. |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
For more information on C<ExpressionAttributeNames> and |
312
|
|
|
|
|
|
|
C<ExpressionAttributeValues>, see Using Placeholders for Attribute |
313
|
|
|
|
|
|
|
Names and Values in the I<Amazon DynamoDB Developer Guide>. |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
=head2 KeyConditions => L<Paws::DynamoDB::KeyConditions> |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
This is a legacy parameter. Use C<KeyConditionExpression> instead. For |
320
|
|
|
|
|
|
|
more information, see KeyConditions in the I<Amazon DynamoDB Developer |
321
|
|
|
|
|
|
|
Guide>. |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
=head2 Limit => Int |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
The maximum number of items to evaluate (not necessarily the number of |
328
|
|
|
|
|
|
|
matching items). If DynamoDB processes the number of items up to the |
329
|
|
|
|
|
|
|
limit while processing the results, it stops the operation and returns |
330
|
|
|
|
|
|
|
the matching values up to that point, and a key in C<LastEvaluatedKey> |
331
|
|
|
|
|
|
|
to apply in a subsequent operation, so that you can pick up where you |
332
|
|
|
|
|
|
|
left off. Also, if the processed data set size exceeds 1 MB before |
333
|
|
|
|
|
|
|
DynamoDB reaches this limit, it stops the operation and returns the |
334
|
|
|
|
|
|
|
matching values up to the limit, and a key in C<LastEvaluatedKey> to |
335
|
|
|
|
|
|
|
apply in a subsequent operation to continue the operation. For more |
336
|
|
|
|
|
|
|
information, see Query and Scan in the I<Amazon DynamoDB Developer |
337
|
|
|
|
|
|
|
Guide>. |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
=head2 ProjectionExpression => Str |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
A string that identifies one or more attributes to retrieve from the |
344
|
|
|
|
|
|
|
table. These attributes can include scalars, sets, or elements of a |
345
|
|
|
|
|
|
|
JSON document. The attributes in the expression must be separated by |
346
|
|
|
|
|
|
|
commas. |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
If no attribute names are specified, then all attributes will be |
349
|
|
|
|
|
|
|
returned. If any of the requested attributes are not found, they will |
350
|
|
|
|
|
|
|
not appear in the result. |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
For more information, see Accessing Item Attributes in the I<Amazon |
353
|
|
|
|
|
|
|
DynamoDB Developer Guide>. |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
=head2 QueryFilter => L<Paws::DynamoDB::FilterConditionMap> |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
This is a legacy parameter. Use C<FilterExpression> instead. For more |
360
|
|
|
|
|
|
|
information, see QueryFilter in the I<Amazon DynamoDB Developer Guide>. |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=head2 ReturnConsumedCapacity => Str |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
Valid values are: C<"INDEXES">, C<"TOTAL">, C<"NONE"> |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=head2 ScanIndexForward => Bool |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
Specifies the order for index traversal: If C<true> (default), the |
373
|
|
|
|
|
|
|
traversal is performed in ascending order; if C<false>, the traversal |
374
|
|
|
|
|
|
|
is performed in descending order. |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
Items with the same partition key value are stored in sorted order by |
377
|
|
|
|
|
|
|
sort key. If the sort key data type is Number, the results are stored |
378
|
|
|
|
|
|
|
in numeric order. For type String, the results are stored in order of |
379
|
|
|
|
|
|
|
ASCII character code values. For type Binary, DynamoDB treats each byte |
380
|
|
|
|
|
|
|
of the binary data as unsigned. |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
If C<ScanIndexForward> is C<true>, DynamoDB returns the results in the |
383
|
|
|
|
|
|
|
order in which they are stored (by sort key value). This is the default |
384
|
|
|
|
|
|
|
behavior. If C<ScanIndexForward> is C<false>, DynamoDB reads the |
385
|
|
|
|
|
|
|
results in reverse order by sort key value, and then returns the |
386
|
|
|
|
|
|
|
results to the client. |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=head2 Select => Str |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
The attributes to be returned in the result. You can retrieve all item |
393
|
|
|
|
|
|
|
attributes, specific item attributes, the count of matching items, or |
394
|
|
|
|
|
|
|
in the case of an index, some or all of the attributes projected into |
395
|
|
|
|
|
|
|
the index. |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=over |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
=item * |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
C<ALL_ATTRIBUTES> - Returns all of the item attributes from the |
402
|
|
|
|
|
|
|
specified table or index. If you query a local secondary index, then |
403
|
|
|
|
|
|
|
for each matching item in the index DynamoDB will fetch the entire item |
404
|
|
|
|
|
|
|
from the parent table. If the index is configured to project all item |
405
|
|
|
|
|
|
|
attributes, then all of the data can be obtained from the local |
406
|
|
|
|
|
|
|
secondary index, and no fetching is required. |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
=item * |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
C<ALL_PROJECTED_ATTRIBUTES> - Allowed only when querying an index. |
411
|
|
|
|
|
|
|
Retrieves all attributes that have been projected into the index. If |
412
|
|
|
|
|
|
|
the index is configured to project all attributes, this return value is |
413
|
|
|
|
|
|
|
equivalent to specifying C<ALL_ATTRIBUTES>. |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=item * |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
C<COUNT> - Returns the number of matching items, rather than the |
418
|
|
|
|
|
|
|
matching items themselves. |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
=item * |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
C<SPECIFIC_ATTRIBUTES> - Returns only the attributes listed in |
423
|
|
|
|
|
|
|
C<AttributesToGet>. This return value is equivalent to specifying |
424
|
|
|
|
|
|
|
C<AttributesToGet> without specifying any value for C<Select>. |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
If you query or scan a local secondary index and request only |
427
|
|
|
|
|
|
|
attributes that are projected into that index, the operation will read |
428
|
|
|
|
|
|
|
only the index and not the table. If any of the requested attributes |
429
|
|
|
|
|
|
|
are not projected into the local secondary index, DynamoDB will fetch |
430
|
|
|
|
|
|
|
each of these attributes from the parent table. This extra fetching |
431
|
|
|
|
|
|
|
incurs additional throughput cost and latency. |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
If you query or scan a global secondary index, you can only request |
434
|
|
|
|
|
|
|
attributes that are projected into the index. Global secondary index |
435
|
|
|
|
|
|
|
queries cannot fetch attributes from the parent table. |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=back |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
If neither C<Select> nor C<AttributesToGet> are specified, DynamoDB |
440
|
|
|
|
|
|
|
defaults to C<ALL_ATTRIBUTES> when accessing a table, and |
441
|
|
|
|
|
|
|
C<ALL_PROJECTED_ATTRIBUTES> when accessing an index. You cannot use |
442
|
|
|
|
|
|
|
both C<Select> and C<AttributesToGet> together in a single request, |
443
|
|
|
|
|
|
|
unless the value for C<Select> is C<SPECIFIC_ATTRIBUTES>. (This usage |
444
|
|
|
|
|
|
|
is equivalent to specifying C<AttributesToGet> without any value for |
445
|
|
|
|
|
|
|
C<Select>.) |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
If you use the C<ProjectionExpression> parameter, then the value for |
448
|
|
|
|
|
|
|
C<Select> can only be C<SPECIFIC_ATTRIBUTES>. Any other value for |
449
|
|
|
|
|
|
|
C<Select> will return an error. |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
Valid values are: C<"ALL_ATTRIBUTES">, C<"ALL_PROJECTED_ATTRIBUTES">, C<"SPECIFIC_ATTRIBUTES">, C<"COUNT"> |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
=head2 B<REQUIRED> TableName => Str |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
The name of the table containing the requested items. |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
=head1 SEE ALSO |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
This class forms part of L<Paws>, documenting arguments for method Query in L<Paws::DynamoDB> |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
=cut |
471
|
|
|
|
|
|
|
|