Initialize this class with params.
Params to initialize this class with.
The type name of the model. Used by {@link Fields."type"} to set a type attribute.
Schema to use for mapping data between the model and table data.
Table to used for reading and writing model data to dynamodb.
Adds a delete item by key to a batch write operation.
BatchWrite operation to added this key to.
Key of item to delete in BatchWrite.
Object to get the resulting item from the BatchWrite result.
Adds a get item by key to a batch get operation.
BatchGet operation to added this key to.
Key of item to fetch in BatchGet.
Object to get the resulting item from the BatchGet result.
Adds a put item to a batch write operation.
BatchWrite operation to added this key to.
Item added to the batch write operation.
Object to get the resulting item from the BatchWrite result.
Adds an item condition check to a transact write operation.
TransactWrite operation to added this item condition check to.
Key of item to used in condition check.
List of conditions to validate when executing the transact write.
Determines what to return on transaction failure.
Object to get the resulting item from the TransactWrite result.
Adds an item delete to a transact write operation.
TransactWrite operation to added this delete item to.
Key of item to delete in transact write.
List of conditions to validate when executing the transact write.
Determines what to return on transaction failure.
Object to get the resulting item from the TransactWrite result.
Adds a get item to a transact get operation.
TransactGet operation to added this key to.
Key of item to fetch in BatchGet.
List of attributes to fetch in TransactGet, if this is empty then all item attributes are return.
Object to get the resulting item from the TransactGet result.
Adds an item put to a transact write operation.
TransactWrite operation to added this put item to.
Item to put in the transact write.
List of conditions to validate when executing the transact write.
Determines what to return on transaction failure.
Object to get the resulting item from the TransactWrite result.
Adds an item update to a transact write operation.
TransactWrite operation to added this update item to.
Item to update in transact write.
List of conditions to validate when executing the transact write.
Determines what to return on transaction failure.
Object to get the resulting item from the TransactWrite result.
Adds the model item to the table and ensures it doesn't already exists. See put for params details.
Wrapper method for DocumentClient.delete method. That uses the model as input and output.
Model key of item to delete.
Additional optional options to use for delete.
An async promise that contains the model data and the table delete result object.
Creates the params that can be used when calling DocumentClient.delete.
Model key of the item to delete.
Additional optional options to use for delete.
Input params for DocumentClient.delete.
Wrapper method for DocumentClient.get method. That uses the model as input and output.
Model key of item to get.
Additional optional options to use for get.
An async promise that contains the model data and the table get result object.
Generate the context used in toModel, toTable and toTableUpdate.
Type of table item action is currently executing.
Options used when reading or writing to the table.
Creates the params that can be used when calling DocumentClient.get.
Model key of the item to get.
Additional optional options to use for get.
Input params for DocumentClient.get.
Wrapper method for DocumentClient.put method. That uses the model as input and output.
Additional optional options to use for put.
An async promise that contains the model data and the table put result object.
Creates the params that can be used when calling DocumentClient.put.
Model item data to put.
Additional optional options to use for put.
Input params for DocumentClient.put.
Replaces the model item in the table only if it already exists. See put for details.
Converts table item data to model data. Method called from the in the model methods after reading or writing data to the table to convert the item and attribute output to model properties.
Table item data to convert to model data.
Context used for converting table to model data, passed to each field object.
Model data converted from the table data.
Converts model data to table data. Methods called called from the model methods before reading or writing data to the table, to convert the model data to the table data.
Model data to convert to table data.
Context used for converting model to table data, passed to each field object.
Table data converted from the model data.
Converts model update data to table update data, similar to toTable but since table updates supports attribute based update expressions updates are handled differently then other actions.
Model update data to convert to table update data.
Context used for converting model to table data, passed to each field object.
Table data converted from the model data.
Wrapper method for DocumentClient.update method. That uses the model as input and output.
Additional optional options to use for update.
An async promise that contains the model data and the table update result object.
Creates the params that can be used when calling DocumentClient.update.
Model item data or update resolver to update.
Additional optional options to use for update.
Input params for DocumentClient.update.
Initializes each field in the schema with the model and associated property name.
Model schema to initialize.
Model to use when initialize each field in the schema.
Helper method that splits the table data into a key and item.
Table used to determine what attributes are keys.
Table data to split into key and item.
The key, item and raw converted model data.
Generated using TypeDoc
The Model object that wraps access to the DynamoDB table and makes it easy to map table data to and from model data.
examples/Model.ts (imports: examples/Table.ts)