1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 21:29:42 +02:00

PostgreSQL prep

Update of vendored SQL libs and refactoring of store provider layer.
This commit is contained in:
HarveyKandola 2018-09-26 17:59:56 +01:00
parent d0e005f638
commit b455e5eaf5
105 changed files with 10949 additions and 2376 deletions

View file

@ -228,6 +228,14 @@ func (r *Row) Columns() ([]string, error) {
return r.rows.Columns()
}
// ColumnTypes returns the underlying sql.Rows.ColumnTypes(), or the deferred error
func (r *Row) ColumnTypes() ([]*sql.ColumnType, error) {
if r.err != nil {
return []*sql.ColumnType{}, r.err
}
return r.rows.ColumnTypes()
}
// Err returns the error encountered while scanning.
func (r *Row) Err() error {
return r.err
@ -593,7 +601,7 @@ func (r *Rows) StructScan(dest interface{}) error {
return errors.New("must pass a pointer, not a value, to StructScan destination")
}
v = reflect.Indirect(v)
v = v.Elem()
if !r.started {
columns, err := r.Columns()