Skip to content

Commit

Permalink
Fixes undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaswallerstedt committed Nov 16, 2023
1 parent b7cb2a6 commit 58f4167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/src/pages/en/modeling/indexes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ keywords:
layout: ../../../layouts/MainLayout.astro
---

import { Picture } from "@astrojs/image/components";

When using ElectroDB, indexes are referenced by their `AccessPatternName`. This allows you to maintain generic index names on your DynamoDB table, but reference domain specific names while using your ElectroDB Entity. These will be referenced as _"Access Patterns"_.

All DynamoDB table start with at least a PartitionKey with an optional SortKey, this can be referred to as the _"Table Index"_. The `indexes` object requires at least the definition of this _Table Index_ **Partition Key** and (if applicable) **Sort Key**.
Expand Down Expand Up @@ -174,7 +172,9 @@ indexes: {

### Composite Attribute Templates

> Note: You may have found examples online that demonstrate how to make keys for Single Table Design. These patterns often look like "user#{id}" or "org#{id}". ElectroDB creates keys similar to these patterns out of the box without the need for using "template". It is _highly_ recommended to only use "template" when you are attempting to use ElectroDB on an existing table/dataset. If you are starting a new project, you should not need to use "template".
export const key = "id"

> Note: You may have found examples online that demonstrate how to make keys for Single Table Design. These patterns often look like <code>user#{key}</code> or <code>org#{key}</code>. ElectroDB creates keys similar to these patterns out of the box without the need for using "template". It is _highly_ recommended to only use "template" when you are attempting to use ElectroDB on an existing table/dataset. If you are starting a new project, you should not need to use "template".
In a Composite Template, you provide a formatted template for ElectroDB to use when making keys. Composite Attribute Templates allow for potential ElectroDB adoption on already established tables and records.

Expand Down

0 comments on commit 58f4167

Please sign in to comment.