go标准库-Sql
                    Contents
                    
                
                
            go语言中文网有很多文档缺少内容比如string.Builder就没有,godoc绝对详尽,推荐阅读godoc
type Rows struct
流式传输的结构,通常和gorm一起用,gorm的tx.Rows会返回这个结构
方法
- func (rs *Rows) Close() error:用完得关闭
 - func (rs *Rows) ColumnTypes() ([]*ColumnType, error):返回列类型
 - func (rs *Rows) Columns() ([]string, error):返回列值
 - func (rs *Rows) Next() bool:下一条数据
 - func (rs *Rows) Scan(dest …any) error:将每列映射到相应的变量中
 
将timestamp映射到time.Time,可以先映射到[]byte,然后用time.Parse
 | 
 |