-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support nested objects and arrays in the model definition (#113)
* feat: support nested objects and arrays in model definition * chore(defineRelationalProperties): use custom "definePropertyAtPath" function * feat: store primary keys in the "PrimaryKey" class * feat: store relations in the "Relation" class * fix: support querying through nested relations * test(update): add nested property update test * fix: support sorting through nested properties Co-authored-by: Artem Zakharchenko <[email protected]>
- Loading branch information
1 parent
3016d6d
commit f5478f9
Showing
43 changed files
with
2,167 additions
and
1,397 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { factory } from '../factory' | ||
import { FactoryAPI } from '../glossary' | ||
|
||
export function drop(db: ReturnType<typeof factory>): void { | ||
export function drop(db: FactoryAPI<any>): void { | ||
Object.values(db).forEach((model) => { | ||
model.deleteMany({ | ||
where: {}, | ||
}) | ||
model.deleteMany({ where: {} }) | ||
}) | ||
} |
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
Oops, something went wrong.