MCPcopy Index your code
hub / github.com/sequelize/sequelize / test

Function test

test/types/where.ts:80–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80async function test() {
81 // find multiple entries
82 let projects: MyModel[] = await MyModel.findAll();
83
84 // search for specific attributes - hash usage
85 projects = await MyModel.findAll({ where: { name: 'A MyModel', groupId: null } });
86
87 // search within a specific range
88 projects = await MyModel.findAll({ where: { id: [1, 2, 3] } });
89
90 // locks
91 projects = await MyModel.findAll({ lock: Transaction.LOCK.KEY_SHARE });
92
93 // locks on model
94 projects = await MyModel.findAll({ lock: { level: Transaction.LOCK.KEY_SHARE, of: MyModel } });
95}
96
97// From https://sequelize.org/master/en/v4/docs/models-usage/
98

Callers

nothing calls this directly

Calls 1

findAllMethod · 0.80

Tested by

no test coverage detected