-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename firstOrSave to firstOrCreate
- Loading branch information
1 parent
d5a2cba
commit 90e6e02
Showing
4 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1569,7 +1569,7 @@ test.group('Base Model | fetch', (group) => { | |
} | ||
|
||
await db.insertQuery().table('users').insert({ username: 'virk' }) | ||
const user = await User.firstOrSave({ userName: 'virk' }) | ||
const user = await User.firstOrCreate({ userName: 'virk' }) | ||
|
||
const totalUsers = await db.query().from('users').count('*', 'total') | ||
|
||
|
@@ -1592,7 +1592,7 @@ test.group('Base Model | fetch', (group) => { | |
} | ||
|
||
await db.insertQuery().table('users').insert({ username: 'virk' }) | ||
const user = await User.firstOrSave({ userName: 'nikk' }, { email: '[email protected]' }) | ||
const user = await User.firstOrCreate({ userName: 'nikk' }, { email: '[email protected]' }) | ||
|
||
const totalUsers = await db.query().from('users').count('*', 'total') | ||
|
||
|