Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
abalaven committed Aug 22, 2022
1 parent 4e58fbc commit 3cc3e3e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
28 changes: 28 additions & 0 deletions gorm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ var people []Person
db.Find(&people)
...
```
### Applying query.Searching

```golang
...
db, assoc, err = gorm.ApplySearchingEx(ctx, db, searching, &PersonORM{}, fieldsForFTS, &Person{})
if err != nil {
...
}
db, err = gorm.JoinAssociations(ctx, db, assoc, &PersonORM{})
if err != nil {
...
}
var people []Person
db.Find(&people)
...
```

### Applying everything

Expand All @@ -78,6 +94,18 @@ var people []Person
db.Find(&people)
...
```
### Applying everything with Searching

```golang
...
db, err = gorm.ApplyCollectionOperatorsWithSearchingEx(ctx, db, &PersonORM{}, &Person{}, filtering, sorting, pagination, fields, searching, fieldsForFTS)
if err != nil {
...
}
var people []Person
db.Find(&people)
...
```


## Transaction Management
Expand Down
9 changes: 9 additions & 0 deletions query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ These types are:
- `infoblox.api.Pagination`
- `infoblox.api.PageInfo`(used in response)
- `infoblox.api.FieldSelection`
- `infoblox.api.Searching`

## Enabling *collection operators* in your application

Expand All @@ -22,6 +23,7 @@ message MyListRequest {
infoblox.api.Sorting sorting = 2;
infoblox.api.Pagination pagination = 3;
infoblox.api.FieldSelection fields = 4;
infoblox.api.Searching searching = 5;
}
```

Expand Down Expand Up @@ -162,3 +164,10 @@ server.WithGateway(
)
)
```
## Searching

The syntax of REST representation of `infoblox.api.Searching` is the following.

| Request Parameter | Description |
| ----------------- |------------------------------------------|
| _fts | A string expression which performs a full-text-search on the DB |

0 comments on commit 3cc3e3e

Please sign in to comment.