Find
The find series of APIs are used to query records from the database. It has the following methods:
-
findManyFind multiple records that match the query criteria.
-
findUniqueFind a single record with a unique criteria.
-
findFirstFind the first record that matches the query criteria.
-
findUniqueOrThrowSimilar to
findUnique, but throws an error if no record is found. -
findFirstOrThrowSimilar to
findFirst, but throws an error if no record is found.
Throughout this section all samples are based on the following ZModel schema:
zenstack/schema.zmodel
Loading...
Basic usage
- Interactive Sample
- Plain Code
Click here to pop out if the embed doesn't load an interactive terminal.
basic.ts
Loading...