Skip to content
프로젝트

소개

복잡한 계층 관계를 모델링하고 단일 테이블 설계를 구현하기 쉽게 하면서도 쿼리 코드를 읽기 쉽게 유지해 주는 DynamoDB 라이브러리입니다.

개발 도구

이 수치를 측정하는 방법

What you can do

  • Single-Table Entity Isolation - Entities created with ElectroDB will not conflict with other entities when using a single DynamoDB table.
  • Attribute Schema Enforcement - Define a schema for your entities with enforced attribute validation, defaults, types, aliases, and more.
  • Easily Compose Hierarchical Access Patterns - Plan and design hierarchical keys for your indexes to multiply your possible access patterns.
  • Simplified Sort Key Condition Querying - Write efficient sort key queries by easily building compose keys.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-2
in 1 month
0

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

ElectroDB

Download Count Coverage Status NPM Bundle Size Runkit Demo Last Commit Issues Sponsors Github Stars

Logo Logo

ElectroDB is a DynamoDB library to ease the use of having multiple entities and complex hierarchical relationships in a single DynamoDB table.

Please submit issues/feedback or reach out on Twitter @tinkertamper.

ElectroDB v3 now released

Visit the v3 migration page to learn more about this new update.


Documentation now found at ElectroDB.dev

ElectroDB's new website for Documentation is now live at electrodb.dev.


The NEW ElectroDB Playground

Try out and share ElectroDB Models, Services, and Single Table Design at electrodb.fun


Features


Turn this

tasks
  .patch({
    team: "core",
    task: "45-662",
    project: "backend",
  })
  .set({ status: "open" })
  .add({ points: 5 })
  .append({
    comments: [
      {
        user: "janet",
        body: "This seems half-baked.",
      },
    ],
  })
  .where(({ status }, { eq }) => eq(status, "in-progress"))
  .go();

Into This

{
  "UpdateExpression": "SET #status = :status_u0, #points = #points + :points_u0, #comments = list_append(#comments, :comments_u0), #updatedAt = :updatedAt_u0, #gsi1sk = :gsi1sk_u0",
  "ExpressionAttributeNames": {
    "#status": "status",
    "#points": "points",
    "#comments": "comments",
    "#updatedAt": "updatedAt",
    "#gsi1sk": "gsi1sk"
  },
  "ExpressionAttributeValues": {
    ":status0": "in-progress",
    ":status_u0": "open",
    ":points_u0": 5,
    ":comments_u0": [
      {
        "user": "janet",
        "body": "This seems half-baked."
      }
    ],
    ":updatedAt_u0": 1630977029015,
    ":gsi1sk_u0": "$assignments#tasks_1#status_open"
  },
  "TableName": "your_table_name",
  "Key": {
    "pk": "$taskapp#team_core",
    "sk": "$tasks_1#project_backend#task_45-662"
  },
  "ConditionExpression": "attribute_exists(pk) AND attribute_exists(sk) AND #status = :status0"
}

Try it out!

관련 프로젝트 살펴보기

불러오는 중…