
Security News
OpenGrep Restores Fingerprinting in JSON and SARIF Outputs
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
express-dynamodb
Advanced tools
express-dynamodb is a wrapper package for DynamoDB that simplifies its usage. It provides convenient functions for common operations such as inserting or updating items, deleting items, and querying items based on different criteria.
express-dynamodb is a wrapper package for DynamoDB that simplifies its usage. It provides convenient functions for common operations such as inserting or updating items, deleting items, and querying items based on different criteria.
npm install express-dynamodb
import { insertOrUpdate, deleteOne, findOne, findMany, findManyByField, findManyPlain, findOperated, findWithin, findAll, setRegion } from 'express-dynamodb';
// Set the AWS region
setRegion('us-east-1');
// Insert or update an item
await insertOrUpdate('tableName', 'pk', item, 'sk');
// Delete an item
await deleteOne('tableName', 'pk', 'pkValue');
// Find one item by partition key
const result = await findOne('tableName', 'pk', 'pkValue');
// Find many items by partition key
const results = await findMany('tableName', 'pk', 'pkValue');
// Find many items by field
const resultsByField = await findManyByField('tableName', 'field', 'value');
// Find many items using plain DynamoDB expression
const resultsPlain = await findManyPlain('tableName', 'filterExpression', {':u': 'value'});
// Find items using operated filters
const operatedResults = await findOperated('tableName', { attribute: value }, { attribute: '<' });
// Find items within a range
const resultsWithinRange = await findWithin('tableName', 'key', start, end);
// Find all items in the table
const allItems = [];
for await (const items of findAll('tableName')) {
allItems.push(...items);
}
Sets the AWS region for DynamoDB operations.
region
: The AWS region (e.g., 'us-east-1').Inserts or updates an item in the table.
tableName
: The name of the table.pk
: The partition key of the item.item
: The item to insert or update.sk
(optional): The sort key of the item.Deletes one item by partition key.
tableName
: The name of the table.pk
: The partition key of the item to be deleted.pkValue
: The value of the partition key.Finds one item by partition key.
tableName
: The name of the table.pk
: The partition key of the item to be found.pkValue
: The value of the partition key.Returns null
if the item is not found.
Finds many items by partition key.
tableName
: The name of the table.pk
: The partition key of the items to be found.pkValue
: The value of the partition key.Returns an array of items.
Finds many items by field key.
tableName
: The name of the table.field
: The field key of the items to be found.value
: The value of the field.Returns an array of items.
Finds many items using a plain DynamoDB expression.
tableName
: The name of the table.filterExpression
: The filter expression.expressionAttributeValues
: The expression attribute values.Returns an array of items.
Finds items using operated filters.
tableName
: The name of the table.filter
: The attributes to be searched and their values in an object.operators
: The operators for each attribute in an object.Returns an array of items.
Finds items within a range.
tableName
: The name of the table.key
: The key to filter within.start
: The start value of the range.end
: The end value of the range.Returns an array of items.
Findsall items in the table.
tableName
: The name of the table.limit
: The maximum number of items to retrieve per batch (default is 10).Returns an async iterable that yields batches of items. Each batch is an array of items.
express-dynamodb is a useful package for simplifying the usage of DynamoDB in an Express.js application. It provides convenient functions for common operations and helps abstract away some of the complexity of working with DynamoDB. By using this package, you can easily perform CRUD operations on your DynamoDB tables and retrieve data based on different criteria.
Author: @rrrokhtar
FAQs
express-dynamodb is a wrapper package for DynamoDB that simplifies its usage. It provides convenient functions for common operations such as inserting or updating items, deleting items, and querying items based on different criteria.
The npm package express-dynamodb receives a total of 0 weekly downloads. As such, express-dynamodb popularity was classified as not popular.
We found that express-dynamodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.