aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2016-11-08 13:22:46 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2016-11-08 13:22:46 +0900
commitea2afbe9e89fa28e9b4ce5942179bb1fa2bb977d (patch)
tree0b2025fb7eadb63e58cfa88db9e641c3adeab66f /sqlite3.go
parentfix trace callback. (diff)
downloadgolite-ea2afbe9e89fa28e9b4ce5942179bb1fa2bb977d.tar.gz
golite-ea2afbe9e89fa28e9b4ce5942179bb1fa2bb977d.tar.xz
revert Multiple Result Set
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go24
1 files changed, 1 insertions, 23 deletions
diff --git a/sqlite3.go b/sqlite3.go
index cfbdae3..1855eb0 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -191,7 +191,6 @@ type SQLiteRows struct {
decltype []string
cls bool
done chan struct{}
- next *SQLiteRows
}
type functionInfo struct {
@@ -471,7 +470,6 @@ func (c *SQLiteConn) Query(query string, args []driver.Value) (driver.Rows, erro
}
func (c *SQLiteConn) query(ctx context.Context, query string, args []namedValue) (driver.Rows, error) {
- var top, cur *SQLiteRows
start := 0
for {
s, err := c.Prepare(query)
@@ -489,14 +487,7 @@ func (c *SQLiteConn) query(ctx context.Context, query string, args []namedValue)
rows, err := s.(*SQLiteStmt).query(ctx, args[:na])
if err != nil && err != driver.ErrSkip {
s.Close()
- return top, err
- }
- if top == nil {
- top = rows.(*SQLiteRows)
- cur = top
- } else {
- cur.next = rows.(*SQLiteRows)
- cur = cur.next
+ return rows, err
}
args = args[na:]
start += na
@@ -772,7 +763,6 @@ func (s *SQLiteStmt) query(ctx context.Context, args []namedValue) (driver.Rows,
decltype: nil,
cls: s.cls,
done: make(chan struct{}),
- next: nil,
}
go func() {
@@ -970,15 +960,3 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
}
return nil
}
-
-func (rc *SQLiteRows) HasNextResultSet() bool {
- return rc.next != nil
-}
-
-func (rc *SQLiteRows) NextResultSet() error {
- if rc.next == nil {
- return io.EOF
- }
- *rc = *rc.next
- return nil
-}