Model

Model

Create new Model

Parameters:

  • [conditions] «Object»

Creates a new instance of the model. This is a schemaless model.

const Locations = amazo.model({
    tableName: "locations-table",
    hashKey: "id",
    sortKey: "name",
    index: null
});

const LocationsByLongAndLat = amazo.model({
    tableName: "locations-table",
    hashKey: "longitude",
    sortKey: "latitude",
    index: "longitude-latitude-index"
});