Finally figured out how to get sqlx to query an object based on a reflect.Type.
This commit is contained in:
parent
859e3ad0e3
commit
59a71534ae
2 changed files with 45 additions and 2 deletions
|
@ -8,6 +8,7 @@ type Login struct {
|
|||
}
|
||||
|
||||
type User struct {
|
||||
Id int `db:"id" json:"id" validate:"isdefault"`
|
||||
Username string `db:"username" validate:"required,max=30"`
|
||||
Email string `db:"email" validate:"required,email,max=128"`
|
||||
Password string `db:"password" validate:"required,min=8,max=64"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue