1- # DynamoDB Toolbox
1+ # DynamoDB Toolbox <!-- omit in toc -->
22
33[ ![ Build Status] ( https://travis-ci.org/jeremydaly/dynamodb-toolbox.svg?branch=master )] ( https://travis-ci.org/jeremydaly/dynamodb-toolbox )
44[ ![ npm] ( https://img.shields.io/npm/v/dynamodb-toolbox.svg )] ( https://www.npmjs.com/package/dynamodb-toolbox )
77
88![ dynamodb-toolbox] ( https://user-images.githubusercontent.com/2053544/69847647-b7910780-1245-11ea-8403-a35a0158f3aa.png )
99
10- ## Single Table Designs have never been this easy!
10+ ## Single Table Designs have never been this easy! <!-- omit in toc -->
1111
1212The ** DynamoDB Toolbox** is a set of tools that makes it easy to work with [ Amazon DynamoDB] ( https://aws.amazon.com/dynamodb/ ) and the [ DocumentClient] ( https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/dynamodb-example-document-client.html ) . It's designed with ** Single Tables** in mind, but works just as well with multiple tables. It lets you define your Entities (with typings and aliases) and map them to your DynamoDB tables. You can then ** generate the API parameters** to ` put ` , ` get ` , ` delete ` , ` update ` , ` query ` , ` scan ` , ` batchGet ` , and ` batchWrite ` data by passing in JavaScript objects. The DynamoDB Toolbox will map aliases, validate and coerce types, and even write complex ` UpdateExpression ` s for you. 😉
1313
@@ -127,7 +127,7 @@ This will return the object mapped to your aliases and composite key mappings:
127127}
128128```
129129
130- ### This is _ NOT_ an ORM (at least it's not trying to be)
130+ ### This is _ NOT_ an ORM (at least it's not trying to be) <!-- omit in toc -->
131131
132132There are several really good Object-Relational Mapping tools (ORMs) out there for DynamoDB. There's the [ Amazon DynamoDB DataMapper For JavaScript] ( https://github.com/awslabs/dynamodb-data-mapper-js ) , [ @Awspilot 's DynamoDB] ( https://awspilot.dev/ ) project, [ @baseprime 's dynamodb] ( https://github.com/baseprime/dynamodb ) package, and many more.
133133
@@ -150,83 +150,79 @@ If you like working with ORMs, that's great, and you should definitely give thes
150150- ** Default Value Dependency Graphs:** Create dynamic attribute defaults by chaining other dynamic attribute defaults together.
151151- ** TypeScript Support:** v0.3 of this library was rewritten in TypeScript to provide strong typing support. Additional work is still required to support schema typing.
152152
153- ## Table of Contents
154-
155- - [ DynamoDB Toolbox] ( #dynamodb-toolbox )
156- - [ Single Table Designs have never been this easy!] ( #single-table-designs-have-never-been-this-easy )
157- - [ Installation and Basic Usage] ( #installation-and-basic-usage )
158- - [ This is _ NOT_ an ORM (at least it's not trying to be)] ( #this-is-not-an-orm-at-least-its-not-trying-to-be )
159- - [ Features] ( #features )
160- - [ Table of Contents] ( #table-of-contents )
161- - [ Conventions, Motivations, and Migrations from v0.1] ( #conventions-motivations-and-migrations-from-v01 )
162- - [ Tables] ( #tables )
163- - [ Specifying Table Definitions] ( #specifying-table-definitions )
164- - [ Table Attributes] ( #table-attributes )
165- - [ Table Indexes] ( #table-indexes )
166- - [ Entities] ( #entities )
167- - [ Specifying Entity Definitions] ( #specifying-entity-definitions )
168- - [ Entity Attributes] ( #entity-attributes )
169- - [ Using a ` string ` ] ( #using-a-string )
170- - [ Using an ` object ` ] ( #using-an-object )
171- - [ Using an ` array ` for composite keys] ( #using-an-array-for-composite-keys )
172- - [ Customize defaults with a ` function ` ] ( #customize-defaults-with-a-function )
173- - [ Table Properties] ( #table-properties )
174- - [ get/set ` DocumentClient ` ] ( #getset-documentclient )
175- - [ get/set ` entities ` ] ( #getset-entities )
176- - [ get/set ` autoExecute ` ] ( #getset-autoexecute )
177- - [ get/set ` autoParse ` ] ( #getset-autoparse )
178- - [ Table Methods] ( #table-methods )
179- - [ query(partitionKey [ ,options] [ ,parameters] )] ( #querypartitionkey-options-parameters )
180- - [ Return Data] ( #return-data )
181- - [ scan([ options] [ ,parameters] )] ( #scanoptions-parameters )
182- - [ Return Data] ( #return-data-1 )
183- - [ batchGet(items [ ,options] [ ,parameters] )] ( #batchgetitems-options-parameters )
184- - [ Specifying options for multiple tables] ( #specifying-options-for-multiple-tables )
185- - [ Return Data] ( #return-data-2 )
186- - [ batchWrite(items [ ,options] [ ,parameters] )] ( #batchwriteitems-options-parameters )
187- - [ Return Data] ( #return-data-3 )
188- - [ transactGet(items [ ,options] [ ,parameters] )] ( #transactgetitems-options-parameters )
189- - [ Accessing items from multiple tables] ( #accessing-items-from-multiple-tables )
190- - [ Return Data] ( #return-data-4 )
191- - [ transactWrite(items [ ,options] [ ,parameters] )] ( #transactwriteitems-options-parameters )
192- - [ Return Data] ( #return-data-5 )
193- - [ parse(entity, input [ ,include] )] ( #parseentity-input-include )
194- - [ get(entity, key [ ,options] [ ,parameters] )] ( #getentity-key-options-parameters )
195- - [ delete(entity, key [ ,options] [ ,parameters] )] ( #deleteentity-key-options-parameters )
196- - [ put(entity, item [ ,options] [ ,parameters] )] ( #putentity-item-options-parameters )
197- - [ update(entity, key [ ,options] [ ,parameters] )] ( #updateentity-key-options-parameters )
198- - [ Entity Properties] ( #entity-properties )
199- - [ get/set ` table ` ] ( #getset-table )
200- - [ get ` DocumentClient ` ] ( #get-documentclient )
201- - [ get/set ` autoExecute ` ] ( #getset-autoexecute-1 )
202- - [ get/set ` autoParse ` ] ( #getset-autoparse-1 )
203- - [ get ` partitionKey ` ] ( #get-partitionkey )
204- - [ get ` sortKey ` ] ( #get-sortkey )
205- - [ Entity Methods] ( #entity-methods )
206- - [ attribute(attribute)] ( #attributeattribute )
207- - [ parse(input [ ,include] )] ( #parseinput-include )
208- - [ get(key [ ,options] [ ,parameters] )] ( #getkey-options-parameters )
209- - [ delete(key [ ,options] [ ,parameters] )] ( #deletekey-options-parameters )
210- - [ put(item [ ,options] [ ,parameters] )] ( #putitem-options-parameters )
211- - [ update(key [ ,options] [ ,parameters] )] ( #updatekey-options-parameters )
212- - [ Updating an attribute] ( #updating-an-attribute )
213- - [ Removing an attribute] ( #removing-an-attribute )
214- - [ Adding a number to a ` number ` attribute] ( #adding-a-number-to-a-number-attribute )
215- - [ Adding values to a ` set ` ] ( #adding-values-to-a-set )
216- - [ Deleting values from a ` set ` ] ( #deleting-values-from-a-set )
217- - [ Appending (or prepending) values to a ` list ` ] ( #appending-or-prepending-values-to-a-list )
218- - [ Remove items from a ` list ` ] ( #remove-items-from-a-list )
219- - [ Update items in a ` list ` ] ( #update-items-in-a-list )
220- - [ Update nested data in a ` map ` ] ( #update-nested-data-in-a-map )
221- - [ query(partitionKey [ ,options] [ ,parameters] )] ( #querypartitionkey-options-parameters-1 )
222- - [ scan([ options] [ ,parameters] )] ( #scanoptions-parameters-1 )
223- - [ Filters and Conditions] ( #filters-and-conditions )
224- - [ Complex Filters and Conditions] ( #complex-filters-and-conditions )
225- - [ Projection Expressions] ( #projection-expressions )
226- - [ Adding Custom Parameters and Clauses] ( #adding-custom-parameters-and-clauses )
227- - [ Additional References] ( #additional-references )
228- - [ Sponsors] ( #sponsors )
229- - [ Contributions and Feedback] ( #contributions-and-feedback )
153+ ## Table of Contents <!-- omit in toc -->
154+
155+ - [ Installation and Basic Usage] ( #installation-and-basic-usage )
156+ - [ Features] ( #features )
157+ - [ Conventions, Motivations, and Migrations from v0.1] ( #conventions-motivations-and-migrations-from-v01 )
158+ - [ Tables] ( #tables )
159+ - [ Specifying Table Definitions] ( #specifying-table-definitions )
160+ - [ Table Attributes] ( #table-attributes )
161+ - [ Table Indexes] ( #table-indexes )
162+ - [ Entities] ( #entities )
163+ - [ Specifying Entity Definitions] ( #specifying-entity-definitions )
164+ - [ Entity Attributes] ( #entity-attributes )
165+ - [ Using a ` string ` ] ( #using-a-string )
166+ - [ Using an ` object ` ] ( #using-an-object )
167+ - [ Using an ` array ` for composite keys] ( #using-an-array-for-composite-keys )
168+ - [ Customize defaults with a ` function ` ] ( #customize-defaults-with-a-function )
169+ - [ Table Properties] ( #table-properties )
170+ - [ get/set ` DocumentClient ` ] ( #getset-documentclient )
171+ - [ get/set ` entities ` ] ( #getset-entities )
172+ - [ get/set ` autoExecute ` ] ( #getset-autoexecute )
173+ - [ get/set ` autoParse ` ] ( #getset-autoparse )
174+ - [ Table Methods] ( #table-methods )
175+ - [ query(partitionKey [ ,options] [ ,parameters] )] ( #querypartitionkey-options-parameters )
176+ - [ Return Data] ( #return-data )
177+ - [ scan([ options] [ ,parameters] )] ( #scanoptions-parameters )
178+ - [ Return Data] ( #return-data-1 )
179+ - [ batchGet(items [ ,options] [ ,parameters] )] ( #batchgetitems-options-parameters )
180+ - [ Specifying options for multiple tables] ( #specifying-options-for-multiple-tables )
181+ - [ Return Data] ( #return-data-2 )
182+ - [ batchWrite(items [ ,options] [ ,parameters] )] ( #batchwriteitems-options-parameters )
183+ - [ Return Data] ( #return-data-3 )
184+ - [ transactGet(items [ ,options] [ ,parameters] )] ( #transactgetitems-options-parameters )
185+ - [ Accessing items from multiple tables] ( #accessing-items-from-multiple-tables )
186+ - [ Return Data] ( #return-data-4 )
187+ - [ transactWrite(items [ ,options] [ ,parameters] )] ( #transactwriteitems-options-parameters )
188+ - [ Return Data] ( #return-data-5 )
189+ - [ parse(entity, input [ ,include] )] ( #parseentity-input-include )
190+ - [ get(entity, key [ ,options] [ ,parameters] )] ( #getentity-key-options-parameters )
191+ - [ delete(entity, key [ ,options] [ ,parameters] )] ( #deleteentity-key-options-parameters )
192+ - [ put(entity, item [ ,options] [ ,parameters] )] ( #putentity-item-options-parameters )
193+ - [ update(entity, key [ ,options] [ ,parameters] )] ( #updateentity-key-options-parameters )
194+ - [ Entity Properties] ( #entity-properties )
195+ - [ get/set ` table ` ] ( #getset-table )
196+ - [ get ` DocumentClient ` ] ( #get-documentclient )
197+ - [ get/set ` autoExecute ` ] ( #getset-autoexecute-1 )
198+ - [ get/set ` autoParse ` ] ( #getset-autoparse-1 )
199+ - [ get ` partitionKey ` ] ( #get-partitionkey )
200+ - [ get ` sortKey ` ] ( #get-sortkey )
201+ - [ Entity Methods] ( #entity-methods )
202+ - [ attribute(attribute)] ( #attributeattribute )
203+ - [ parse(input [ ,include] )] ( #parseinput-include )
204+ - [ get(key [ ,options] [ ,parameters] )] ( #getkey-options-parameters )
205+ - [ delete(key [ ,options] [ ,parameters] )] ( #deletekey-options-parameters )
206+ - [ put(item [ ,options] [ ,parameters] )] ( #putitem-options-parameters )
207+ - [ update(key [ ,options] [ ,parameters] )] ( #updatekey-options-parameters )
208+ - [ Updating an attribute] ( #updating-an-attribute )
209+ - [ Removing an attribute] ( #removing-an-attribute )
210+ - [ Adding a number to a ` number ` attribute] ( #adding-a-number-to-a-number-attribute )
211+ - [ Adding values to a ` set ` ] ( #adding-values-to-a-set )
212+ - [ Deleting values from a ` set ` ] ( #deleting-values-from-a-set )
213+ - [ Appending (or prepending) values to a ` list ` ] ( #appending-or-prepending-values-to-a-list )
214+ - [ Remove items from a ` list ` ] ( #remove-items-from-a-list )
215+ - [ Update items in a ` list ` ] ( #update-items-in-a-list )
216+ - [ Update nested data in a ` map ` ] ( #update-nested-data-in-a-map )
217+ - [ query(partitionKey [ ,options] [ ,parameters] )] ( #querypartitionkey-options-parameters-1 )
218+ - [ scan([ options] [ ,parameters] )] ( #scanoptions-parameters-1 )
219+ - [ Filters and Conditions] ( #filters-and-conditions )
220+ - [ Complex Filters and Conditions] ( #complex-filters-and-conditions )
221+ - [ Projection Expressions] ( #projection-expressions )
222+ - [ Adding Custom Parameters and Clauses] ( #adding-custom-parameters-and-clauses )
223+ - [ Additional References] ( #additional-references )
224+ - [ Contributions and Feedback] ( #contributions-and-feedback )
225+ - [ Version 0.4 Alpha] ( #version-04-alpha )
230226
231227## Conventions, Motivations, and Migrations from v0.1
232228
0 commit comments