We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9adbc06 + 5d28545 commit 7cbed6aCopy full SHA for 7cbed6a
sqlx.go
@@ -228,6 +228,14 @@ func (r *Row) Columns() ([]string, error) {
228
return r.rows.Columns()
229
}
230
231
+// ColumnTypes returns the underlying sql.Rows.ColumnTypes(), or the deferred error
232
+func (r *Row) ColumnTypes() ([]*sql.ColumnType, error) {
233
+ if r.err != nil {
234
+ return []*sql.ColumnType{}, r.err
235
+ }
236
+ return r.rows.ColumnTypes()
237
+}
238
+
239
// Err returns the error encountered while scanning.
240
func (r *Row) Err() error {
241
return r.err
0 commit comments