DynamoDB: Not Begins With (Guide w/ Code Examples)
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: BatchGetItem
- DynamoDB: Query Date Range
- DynamoDB: Like
- DynamoDB: Query Greater Than
- DynamoDB: Get Table
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Delete Table
- DynamoDB: Get Query
- DynamoDB: GetItem
- DynamoDB: Delete
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Get All Items
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Increment Counter
Tired of switching accounts and regions? Use Dynobase.
First 7 days are on us. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2023 Dynobase