Re: [go-nuts] improve the reflection of golang

2018-11-20 Thread 'yinbingjun' via golang-nuts
sqlx does not support mutiple sql and results. > On Nov 20, 2018, at 14:26, Reto Brunner wrote: > > If you want to do that, there's already a package for it: > https://github.com/jmoiron/sqlx > > ``` > people := []Person{} > db.Select(&people, "SELECT * FROM person ORDER BY first_name ASC") >

Re: [go-nuts] improve the reflection of golang

2018-11-19 Thread Reto Brunner
If you want to do that, there's already a package for it: https://github.com/jmoiron/sqlx ``` people := []Person{} db.Select(&people, "SELECT * FROM person ORDER BY first_name ASC") ``` -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubsc

Re: [go-nuts] improve the reflection of golang

2018-11-19 Thread 'yinbingjun' via golang-nuts
in database/sql rows.Scan(…) can only copy values to seperate variables, the style is not comfortable ,I want use a struct as database row. I want to use unexported database/sql.convertAssign, type Test struct { Name string Age int Email

Re: [go-nuts] improve the reflection of golang

2018-11-19 Thread Ian Lance Taylor
On Mon, Nov 19, 2018 at 2:11 AM, iamybj via golang-nuts wrote: > > I am dong a simple sql library, but i need access some unexpected members in > the std lib. > I find this project https://github.com/alangpierce/go-forceexport > but it is out of date.\ > > The authors of golang are some old progra