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 9486411 commit 6290a14Copy full SHA for 6290a14
stmt.go
@@ -110,7 +110,10 @@ func (s *Stmt) Step() bool {
110
s.err = INTERRUPT
111
return false
112
}
113
+ return s.step()
114
+}
115
116
+func (s *Stmt) step() bool {
117
rc := res_t(s.c.call("sqlite3_step", stk_t(s.handle)))
118
switch rc {
119
case _ROW:
@@ -135,7 +138,11 @@ func (s *Stmt) Err() error {
135
138
// Exec is a convenience function that repeatedly calls [Stmt.Step] until it returns false,
136
139
// then calls [Stmt.Reset] to reset the statement and get any error that occurred.
137
140
func (s *Stmt) Exec() error {
- for s.Step() {
141
+ if s.c.interrupt.Err() != nil {
142
+ return INTERRUPT
143
+ }
144
+ // TODO: implement this in C.
145
+ for s.step() {
146
147
return s.Reset()
148
0 commit comments