We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb853d0 commit 7d10860Copy full SHA for 7d10860
blob_io.go
@@ -68,6 +68,10 @@ func (s *SQLiteBlob) Read(b []byte) (n int, err error) {
68
return 0, io.EOF
69
}
70
71
+ if len(b) == 0 {
72
+ return 0, nil
73
+ }
74
+
75
n = s.size - s.offset
76
if len(b) < n {
77
n = len(b)
@@ -86,6 +90,10 @@ func (s *SQLiteBlob) Read(b []byte) (n int, err error) {
86
90
87
91
// Write implements the io.Writer interface.
88
92
func (s *SQLiteBlob) Write(b []byte) (n int, err error) {
93
94
95
96
89
97
if s.offset >= s.size {
98
return 0, fmt.Errorf("sqlite3.SQLiteBlob.Write: insufficient space in %d-byte blob", s.size)
99
0 commit comments