-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Model+QueryBuilder types for single fetch
• add an IsSingle type argument to QueryBuilder to track if first() has been invoked • add the toJSON method to QueryBuilder • update return types of BaseModel query methods to return a QueryBuilder • update QueryBuilder promise methods (then/catch) to resolve query results based on if IsSingle (i.e. if first() has been invoked) or not
- Loading branch information
Showing
1 changed file
with
48 additions
and
19 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