Skip to content

Instantly share code, notes, and snippets.

View ozanyurtsever's full-sized avatar
🎯
Focusing

Ozan Yurtsever ozanyurtsever

🎯
Focusing
View GitHub Profile
@MurylloEx
MurylloEx / electrodb-repository-pattern.ts
Created April 16, 2023 02:50
A sample of Repository design pattern in DynamoDB using ElectroDB as library to access the AWS DynamoDB.
import { v4 as uuid } from 'uuid';
import { generate } from 'randomstring';
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
import {
Schema,
Entity,
Item,
AllTableIndexCompositeAttributes,
PutItem