Wanting to use an ODM w/DynamoDB and Lambda sort of like Mongoose for MongoDB. I generally avoid creating subject domain objects (e.g., Patient, Course, Order, etc.) so DDM's object binding approach isn't great for me. Is there a way to create a table model, which you can use subsequently to create documents? Sort of like the way mongoose does...
const mongoose = require('mongoose');
(async () => {
// Create the table model
const Course = mongoose.model("Course", {
course_id: {
type: String
},
course_name: {
name: String
}
});
// Create a new document
const csc101 = new Course({
course_id: 101,
course_name: "Introduction to Mongoose"
});
try {
await csc101.save();
} catch (error) {
console.log("Shiz went bad b.", error);
}
})();
Wanting to use an ODM w/DynamoDB and Lambda sort of like Mongoose for MongoDB. I generally avoid creating subject domain objects (e.g., Patient, Course, Order, etc.) so DDM's object binding approach isn't great for me. Is there a way to create a table model, which you can use subsequently to create documents? Sort of like the way mongoose does...