Complete the code to import Sequelize in a Node.js project.
const Sequelize = require('[1]');
The npm package name for Sequelize is sequelize (lowercase).
Complete the code to initialize a Prisma client instance.
const prisma = new [1]();To use Prisma, you create a new instance of PrismaClient.
Fix the error in this Sequelize model definition by completing the missing data type.
const User = sequelize.define('User', { username: { type: Sequelize.[1], allowNull: false } });
Sequelize data types are uppercase constants like STRING.
Fill both blanks to write a Prisma query that finds all users with age greater than 18.
const adults = await prisma.user.findMany({
where: {
age: { [1]: [2] }
}
});In Prisma, gt means 'greater than'. We compare age to 18.
Fill all three blanks to create a Sequelize model with a 'title' string and 'published' boolean fields.
const Post = sequelize.define('Post', { title: { type: Sequelize.[1], allowNull: false }, published: { type: Sequelize.[2], defaultValue: [3] } });
Use STRING for text and BOOLEAN for true/false. Default is false here.
