Commit cedd3642 authored by gwenn's avatar gwenn

Scan methods return a value even on type mismatch.

parent dd7e497c
...@@ -724,9 +724,7 @@ func (s *Stmt) ScanInt(index int) (value int, isNull bool, err os.Error) { ...@@ -724,9 +724,7 @@ func (s *Stmt) ScanInt(index int) (value int, isNull bool, err os.Error) {
isNull = true isNull = true
} else { } else {
if s.CheckTypeMismatch { if s.CheckTypeMismatch {
if err = s.checkTypeMismatch(ctype, Integer); err != nil { err = s.checkTypeMismatch(ctype, Integer)
return
}
} }
value = int(C.sqlite3_column_int(s.stmt, C.int(index))) value = int(C.sqlite3_column_int(s.stmt, C.int(index)))
} }
...@@ -746,9 +744,7 @@ func (s *Stmt) ScanInt64(index int) (value int64, isNull bool, err os.Error) { ...@@ -746,9 +744,7 @@ func (s *Stmt) ScanInt64(index int) (value int64, isNull bool, err os.Error) {
isNull = true isNull = true
} else { } else {
if s.CheckTypeMismatch { if s.CheckTypeMismatch {
if err = s.checkTypeMismatch(ctype, Integer); err != nil { err = s.checkTypeMismatch(ctype, Integer)
return
}
} }
value = int64(C.sqlite3_column_int64(s.stmt, C.int(index))) value = int64(C.sqlite3_column_int64(s.stmt, C.int(index)))
} }
...@@ -768,9 +764,7 @@ func (s *Stmt) ScanByte(index int) (value byte, isNull bool, err os.Error) { ...@@ -768,9 +764,7 @@ func (s *Stmt) ScanByte(index int) (value byte, isNull bool, err os.Error) {
isNull = true isNull = true
} else { } else {
if s.CheckTypeMismatch { if s.CheckTypeMismatch {
if err = s.checkTypeMismatch(ctype, Integer); err != nil { err = s.checkTypeMismatch(ctype, Integer)
return
}
} }
value = byte(C.sqlite3_column_int(s.stmt, C.int(index))) value = byte(C.sqlite3_column_int(s.stmt, C.int(index)))
} }
...@@ -790,9 +784,7 @@ func (s *Stmt) ScanBool(index int) (value bool, isNull bool, err os.Error) { ...@@ -790,9 +784,7 @@ func (s *Stmt) ScanBool(index int) (value bool, isNull bool, err os.Error) {
isNull = true isNull = true
} else { } else {
if s.CheckTypeMismatch { if s.CheckTypeMismatch {
if err = s.checkTypeMismatch(ctype, Integer); err != nil { err = s.checkTypeMismatch(ctype, Integer)
return
}
} }
value = C.sqlite3_column_int(s.stmt, C.int(index)) == 1 value = C.sqlite3_column_int(s.stmt, C.int(index)) == 1
} }
...@@ -812,9 +804,7 @@ func (s *Stmt) ScanFloat64(index int) (value float64, isNull bool, err os.Error) ...@@ -812,9 +804,7 @@ func (s *Stmt) ScanFloat64(index int) (value float64, isNull bool, err os.Error)
isNull = true isNull = true
} else { } else {
if s.CheckTypeMismatch { if s.CheckTypeMismatch {
if err = s.checkTypeMismatch(ctype, Float); err != nil { err = s.checkTypeMismatch(ctype, Float)
return
}
} }
value = float64(C.sqlite3_column_double(s.stmt, C.int(index))) value = float64(C.sqlite3_column_double(s.stmt, C.int(index)))
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment