-
Notifications
You must be signed in to change notification settings - Fork 1
/
set.go
34 lines (30 loc) · 950 Bytes
/
set.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2009 Peter H. Froehlich. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package db
import "os"
// The simplest way of processing query results.
//
// Iter() returns a channel of Result objects which can be
// examined one at a time. Calling Iter() repeatedly will
// return the same channel over and over again, ResultSet
// does not cache results. Once Close() has been called,
// Iter() will return nil.
//
// Close() shuts down the iteration mechanism and frees all
// associated resources.
type ResultSet interface {
Iter() <-chan Result;
Close() os.Error;
}
// InformativeResultSets supply useful but optional information.
//
// Names() returns the names of each item of data in the
// result.
//
// Types() returns the names of the types of each item in
// the result.
type InformativeResultSet interface {
Names() []string;
Types() []string;
}