Useful links articles:
Sequelize : https://dev.to/nedsoft/getting-started-with-sequelize-and-postgres-emp
PostgreSql : https://www.digitalocean.com/community/tutorials/how-to-install-postgresql-on-ubuntu-20-04-quickstart
//First method
// selecting authorityId :12 or 13
model.findAll({
where: {
[Op.or]: [
{ authorId: 12 },
{ authorId: 13 }
]
}
});
{ where: { [Op.and]: [{ Col1: val1 }, { Col2: val2 }]} }
await Tag.findAll({
where: {
id: {
[Sequelize.Op.in]: [1, 2, 3, 4]
}
}
});
// second method
// selecting authorityId :12 or 13
model.findAll({
where: {
authorId: {
[Op.or]: [12, 13]
}
}
});
npm install --save sequelize
Sequelize is a modern TypeScript and Node.js ORM for Postgres, MySQL, MariaDB, SQLite and SQL Server, and more.
Featuring solid transaction support, relations, eager and lazy loading, read replication and more.
Sequelize is a modern TypeScript and Node.js ORM for Postgres,
MySQL, MariaDB, SQLite and SQL Server, and more.
Featuring solid transaction support, relations,
eager and lazy loading, read replication and more.