Skip to content

Commit

Permalink
update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Jan 31, 2023
1 parent d01a1b9 commit 0cb49f6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/repository-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,30 @@ const count = await repository.count({
const count = await repository.countBy({ firstName: "Timber" })
```

- `sum` - Returns the sum of a numeric field for all entities that match `FindOptionsWhere`.

```typescript
const count = await repository.sum("age", { firstName: "Timber" })
```

- `average` - Returns the average of a numeric field for all entities that match `FindOptionsWhere`.

```typescript
const count = await repository.average("age", { firstName: "Timber" })
```

- `minimum` - Returns the minimum of a numeric field for all entities that match `FindOptionsWhere`.

```typescript
const count = await repository.minimum("age", { firstName: "Timber" })
```

- `maximum` - Returns the maximum of a numeric field for all entities that match `FindOptionsWhere`.

```typescript
const count = await repository.maximum("age", { firstName: "Timber" })
```

- `find` - Finds entities that match given `FindOptions`.

```typescript
Expand Down

0 comments on commit 0cb49f6

Please sign in to comment.