Skip to content

Function DoesntExist

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'
});
ReferenceLooks LikeValue
await factory.NewQuery().where('email', 'linbolen@gradii.com').doesntExist()exactly matchfalse
await factory.NewQuery().where('email', 'mohamed@laravel.com').doesntExist()exactly matchtrue
ReferenceLooks LikeValue
model.emailexactly match'linbolen@gradii.com'
model.email !== undefinedexactly matchtrue
ReferenceLooks LikeValue
friends !== undefinedexactly matchtrue
friendsmatch[]
ReferenceLooks LikeValue
modelinstance type exactly matchFedacoTestUser
model.idmatch1
ReferenceLooks LikeValue
modelinstance type exactly matchFedacoTestUser
model.idmatch2
ReferenceLooks LikeValue
missingexactly matchUndefined();
ReferenceLooks LikeValue
isArray(collection)exactly matchtrue
collection.lengthexactly match0
ReferenceLooks LikeValue
isArray(collection)exactly matchtrue
collection.lengthexactly match2
typescript
// .cursor();
for (const m of models) {
  expect(m.id).toEqual(1);
  expect(m.getConnectionName()).toBe('default');
}

see also prerequisites

Released under the MIT License.