@sswahn/dynamo
Advanced tools
Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
{ | ||
"name": "@sswahn/dynamo", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "This library simplifies common DynamoDB CRUD operations, providing a seamless and intuitive experience.", |
@@ -27,9 +27,2 @@ # Dynamo · [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/sswahn/dynamo/blob/main/LICENSE) ![npm version](https://img.shields.io/npm/v/@sswahn/dynamo) | ||
```javascript | ||
const data = { | ||
UserId: 'user123', // Specify the partition key value | ||
Name: 'John Doe', | ||
Age: 30, | ||
IsActive: true, | ||
Preferences: { language: 'en', theme: 'light' }, | ||
} | ||
const response = await dynamo.create(data) | ||
@@ -41,3 +34,2 @@ ``` | ||
```javascript | ||
const limit = 15 | ||
const response = await dynamo.read(limit) | ||
@@ -49,5 +41,2 @@ ``` | ||
```javascript | ||
const key = { | ||
UserId: 'user123', // Specify the partition key value | ||
} | ||
const response = await dynamo.readOne(key) | ||
@@ -59,9 +48,2 @@ ``` | ||
```javascript | ||
const data = { | ||
Age: 31, // Update the Age attribute | ||
Preferences: { language: 'es' }, // Update the Preferences attribute | ||
} | ||
const key = { | ||
UserId: 'user123', // Specify the partition key value | ||
} | ||
const response = await dynamo.update(data, key) | ||
@@ -73,5 +55,2 @@ ``` | ||
```javascript | ||
const key = { | ||
UserId: 'user123', // Specify the partition key value | ||
} | ||
const response = await dynamo.remove(key) | ||
@@ -78,0 +57,0 @@ ``` |
8948
61