Function Where
basic model retrieval
typescript
const factory = new FedacoTestUser();
await factory.NewQuery().create({
id: 1,
email: 'linbolen@gradii.com'
});
await factory.NewQuery().create({
id: 2,
email: 'xsilen@gradii.com'
});
Reference Looks Like Value await factory.NewQuery().where('email', 'linbolen@gradii.com').doesntExist()exactly match falseawait factory.NewQuery().where('email', 'mohamed@laravel.com').doesntExist()exactly match true
Reference Looks Like Value model.emailexactly match 'linbolen@gradii.com'model.email !== undefinedexactly match true
Reference Looks Like Value friends !== undefinedexactly match truefriendsmatch []
Reference Looks Like Value modelinstance type exactly match FedacoTestUsermodel.idmatch 1
Reference Looks Like Value modelinstance type exactly match FedacoTestUsermodel.idmatch 2
Reference Looks Like Value missingexactly match Undefined();
Reference Looks Like Value isArray(collection)exactly match truecollection.lengthexactly match 0
Reference Looks Like Value isArray(collection)exactly match truecollection.lengthexactly match 2
typescript
// .cursor();
for (const m of models) {
expect(m.id).toEqual(1);
expect(m.getConnectionName()).toBe('default');
}see also prerequisites