File tree Expand file tree Collapse file tree 1 file changed +30
-9
lines changed Expand file tree Collapse file tree 1 file changed +30
-9
lines changed Original file line number Diff line number Diff line change @@ -604,15 +604,6 @@ func (r resultRowsAffected) RowsAffected() (int64, error) {
604
604
return int64 (r ), nil
605
605
}
606
606
607
- type rows struct {
608
- ctx context.Context
609
- * stmt
610
- names []string
611
- types []string
612
- nulls []bool
613
- scans []scantype
614
- }
615
-
616
607
type scantype byte
617
608
618
609
const (
@@ -648,10 +639,20 @@ func scanFromDecl(decl string) scantype {
648
639
return _ANY
649
640
}
650
641
642
+ type rows struct {
643
+ ctx context.Context
644
+ * stmt
645
+ names []string
646
+ types []string
647
+ nulls []bool
648
+ scans []scantype
649
+ }
650
+
651
651
var (
652
652
// Ensure these interfaces are implemented:
653
653
_ driver.RowsColumnTypeDatabaseTypeName = & rows {}
654
654
_ driver.RowsColumnTypeNullable = & rows {}
655
+ // _ driver.RowsColumnScanner = &rows{}
655
656
)
656
657
657
658
func (r * rows ) Close () error {
@@ -830,3 +831,23 @@ func (r *rows) Next(dest []driver.Value) error {
830
831
}
831
832
return nil
832
833
}
834
+
835
+ func (r * rows ) ScanColumn (dest any , index int ) error {
836
+ // notest // Go 1.26
837
+ var ptr * time.Time
838
+ switch d := dest .(type ) {
839
+ case * time.Time :
840
+ ptr = d
841
+ case * sql.NullTime :
842
+ ptr = & d .Time
843
+ case * sql.Null [time.Time ]:
844
+ ptr = & d .V
845
+ default :
846
+ return driver .ErrSkip
847
+ }
848
+ if t := r .Stmt .ColumnTime (index , r .tmRead ); ! t .IsZero () {
849
+ * ptr = t
850
+ return nil
851
+ }
852
+ return driver .ErrSkip
853
+ }
You can’t perform that action at this time.
0 commit comments