@@ -23,9 +23,9 @@ import (
23
23
24
24
// ReturnStatus may be used to return the return value from a proc.
25
25
//
26
- // var rs mssql.ReturnStatus
27
- // _, err := db.Exec("theproc", &rs)
28
- // log.Printf("return status = %d", rs)
26
+ // var rs mssql.ReturnStatus
27
+ // _, err := db.Exec("theproc", &rs)
28
+ // log.Printf("return status = %d", rs)
29
29
type ReturnStatus int32
30
30
31
31
var driverInstance = & Driver {processQueryText : true }
@@ -243,8 +243,6 @@ func (c *Conn) checkBadConn(ctx context.Context, err error, mayRetry bool) error
243
243
return nil
244
244
case io .EOF :
245
245
c .connectionGood = false
246
- case ErrorCancelConfirmation :
247
- c .connectionGood = false
248
246
case driver .ErrBadConn :
249
247
// It is an internal programming error if driver.ErrBadConn
250
248
// is ever passed to this function. driver.ErrBadConn should
@@ -879,22 +877,24 @@ func (r *Rows) ColumnTypeDatabaseTypeName(index int) string {
879
877
// not a variable length type ok should return false.
880
878
// If length is not limited other than system limits, it should return math.MaxInt64.
881
879
// The following are examples of returned values for various types:
882
- // TEXT (math.MaxInt64, true)
883
- // varchar(10) (10, true)
884
- // nvarchar(10) (10, true)
885
- // decimal (0, false)
886
- // int (0, false)
887
- // bytea(30) (30, true)
880
+ //
881
+ // TEXT (math.MaxInt64, true)
882
+ // varchar(10) (10, true)
883
+ // nvarchar(10) (10, true)
884
+ // decimal (0, false)
885
+ // int (0, false)
886
+ // bytea(30) (30, true)
888
887
func (r * Rows ) ColumnTypeLength (index int ) (int64 , bool ) {
889
888
return makeGoLangTypeLength (r .cols [index ].ti )
890
889
}
891
890
892
891
// It should return
893
892
// the precision and scale for decimal types. If not applicable, ok should be false.
894
893
// The following are examples of returned values for various types:
895
- // decimal(38, 4) (38, 4, true)
896
- // int (0, 0, false)
897
- // decimal (math.MaxInt64, math.MaxInt64, true)
894
+ //
895
+ // decimal(38, 4) (38, 4, true)
896
+ // int (0, 0, false)
897
+ // decimal (math.MaxInt64, math.MaxInt64, true)
898
898
func (r * Rows ) ColumnTypePrecisionScale (index int ) (int64 , int64 , bool ) {
899
899
return makeGoLangTypePrecisionScale (r .cols [index ].ti )
900
900
}
@@ -1321,22 +1321,24 @@ func (r *Rowsq) ColumnTypeDatabaseTypeName(index int) string {
1321
1321
// not a variable length type ok should return false.
1322
1322
// If length is not limited other than system limits, it should return math.MaxInt64.
1323
1323
// The following are examples of returned values for various types:
1324
- // TEXT (math.MaxInt64, true)
1325
- // varchar(10) (10, true)
1326
- // nvarchar(10) (10, true)
1327
- // decimal (0, false)
1328
- // int (0, false)
1329
- // bytea(30) (30, true)
1324
+ //
1325
+ // TEXT (math.MaxInt64, true)
1326
+ // varchar(10) (10, true)
1327
+ // nvarchar(10) (10, true)
1328
+ // decimal (0, false)
1329
+ // int (0, false)
1330
+ // bytea(30) (30, true)
1330
1331
func (r * Rowsq ) ColumnTypeLength (index int ) (int64 , bool ) {
1331
1332
return makeGoLangTypeLength (r .cols [index ].ti )
1332
1333
}
1333
1334
1334
1335
// It should return
1335
1336
// the precision and scale for decimal types. If not applicable, ok should be false.
1336
1337
// The following are examples of returned values for various types:
1337
- // decimal(38, 4) (38, 4, true)
1338
- // int (0, 0, false)
1339
- // decimal (math.MaxInt64, math.MaxInt64, true)
1338
+ //
1339
+ // decimal(38, 4) (38, 4, true)
1340
+ // int (0, 0, false)
1341
+ // decimal (math.MaxInt64, math.MaxInt64, true)
1340
1342
func (r * Rowsq ) ColumnTypePrecisionScale (index int ) (int64 , int64 , bool ) {
1341
1343
return makeGoLangTypePrecisionScale (r .cols [index ].ti )
1342
1344
}
0 commit comments