DynamoDB: Not Begins With (Guide w/ Code Examples)
![Rafal Wilinski](https://pbs.twimg.com/profile_images/1390706809548197895/SVCKpLNE_400x400.png)
Provided by Rafal Wilinski
The DynamoDB JavaScript SDK does not have a method specifically called "not begins with." However, you can use the scan
or query
operations with a FilterExpression
that uses the not_begins_with
method to retrieve items that do not have an attribute that begins with a certain value.
const AWS = require('aws-sdk'); const dynamoDB = new AWS.DynamoDB({region: 'us-west-2', apiVersion: '2012-08-10'}); const params = { TableName: 'my-table', FilterExpression: 'not_begins_with(attribute, :val)', ExpressionAttributeValues: { ':val': {S: 'example'} } }; dynamoDB.scan(params, (err, data) => { if (err) { console.log(err); } else { console.log(data); } });
Similar Code Examples
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Get All Items
- DynamoDB: Get Unique Values
- DynamoDB: Get Query
- DynamoDB: Get By ID
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Delete
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Get Last Inserted Item
- DynamoDB: Query Count
- DynamoDB: Increment Counter
- DynamoDB: Attribute Not Null
- DynamoDB: Query Group By
- DynamoDB: Query Greater Than
- DynamoDB: Delete Table
Spend less time in the AWS console, use Dynobase.
Try 7-day free trial. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2024 Dynobase