Skip to content

Commit

Permalink
minor refactoring in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Umang01-hash committed Aug 21, 2024
1 parent 44daec5 commit 7154e49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/quick-start/add-rest-handlers/page.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ func (u *userEntity) TableName() string {
```

## Adding Database Constraints
By default, the GoFr assumes to have manual insertion of id for a given struct, but to support sql constraints like `auto-increment`,
By default, GoFr assumes to have manual insertion of id for a given struct, but to support sql constraints like `auto-increment`,
`not-null` user can use the `sql` tag while declaring the struct fields.

```go
type user struct {
Id int `json:"id" sql:"auto_increment"`
ID int `json:"id" sql:"auto_increment"`
Name string `json:"name" sql:"not_null"`
Age int `json:"age"`
IsEmployed bool `json:"isEmployed"`
Expand Down

0 comments on commit 7154e49

Please sign in to comment.