Wraith. Store. Keys
(Wraith v0.1.0)
View Source
Where every entity lives in the one table. All keys are built here so the layout is readable in one place.
| entity | pk | sk | gsi1pk | gsi1sk |
|---|---|---|---|---|
| site settings | SITE | SETTINGS | ||
| user (author) | USER#id | USER | USERS | email |
| user by email | EMAIL#email | USER | ||
| user by slug | USLUG#slug | USER | ||
| auth session | TOKEN#hash | SESSION | SESSIONS#user_id | created_at |
| post | POST#id | POST | POSTS#status | sort_at#id |
| post by slug | SLUG#slug | POST | ||
| post revision | POST#id | REV#at | ||
| post in tag | TAG#slug | POST#sort_at#id | ||
| post by author | AUTHOR#user_id | POST#sort_at#id | ||
| tag | TAG#slug | TAG | TAGS | name |
| member | MEMBER#id | MEMBER | MEMBERS | created_at#id |
| member by email | MEMBER_EMAIL#email | MEMBER | ||
| widget | WIDGET#slug | WIDGET | WIDGETS | name |
| widget version | WIDGET#slug | VER#n | ||
| widget state | WSTATE#widget#instance | STATE | ||
| studio session | STUDIO | SESSION#id | ||
| studio transcript | STUDIO#session_id | MSG#at#seq |
Summary
Functions
Zero-padded so lexical order is numeric order.
Functions
Zero-padded so lexical order is numeric order.