mirror of https://github.com/VinGarcia/ksql.git
Partially update example_service to include the JSON feature
Its only partial because currently the function `structs.FillStructWith` doesn't support the attributes tagged as `kissorm:"?,json"` The task of updating the FillStructWith was updated to include this behaviorpull/2/head
parent
6f1885d3a0
commit
ff4952da65
|
@ -250,6 +250,7 @@ ok github.com/vingarcia/kissorm 21.740s
|
||||||
- Improve error messages
|
- Improve error messages
|
||||||
- Add tests for tables using composite keys
|
- Add tests for tables using composite keys
|
||||||
- Add support for serializing structs as other formats such as YAML
|
- Add support for serializing structs as other formats such as YAML
|
||||||
|
- Update structs.FillStructWith to work with `json` tagged attributes
|
||||||
|
|
||||||
### Optimizations Oportunities
|
### Optimizations Oportunities
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,15 @@ type UserEntity struct {
|
||||||
Age *int `kissorm:"age"`
|
Age *int `kissorm:"age"`
|
||||||
Score *int `kissorm:"score"`
|
Score *int `kissorm:"score"`
|
||||||
LastPayment time.Time `kissorm:"last_payment"`
|
LastPayment time.Time `kissorm:"last_payment"`
|
||||||
|
Address *Address `kissorm:"address,json"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Address contains the user's address
|
||||||
|
type Address struct {
|
||||||
|
AddrLines []string `json:"addr_lines"`
|
||||||
|
City string `json:"city"`
|
||||||
|
State string `json:"state"`
|
||||||
|
Country string `json:"country"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewUserService ...
|
// NewUserService ...
|
||||||
|
|
Loading…
Reference in New Issue