Finally figured out how to get sqlx to query an object based on a reflect.Type.

This commit is contained in:
Zed A. Shaw 2025-07-14 00:52:10 -04:00
parent 859e3ad0e3
commit 59a71534ae
2 changed files with 45 additions and 2 deletions

View file

@ -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"`