2
0

Rows and Row are now interfaces

This commit is contained in:
Jack Christensen
2019-04-11 17:53:52 -05:00
parent 5ea8191003
commit 938ee9f434
11 changed files with 117 additions and 87 deletions
+3 -3
View File
@@ -144,7 +144,7 @@ func (b *Batch) ExecResults() (pgconn.CommandTag, error) {
// QueryResults reads the results from the next query in the batch as if the
// query has been sent with Query.
func (b *Batch) QueryResults() (*Rows, error) {
func (b *Batch) QueryResults() (Rows, error) {
rows := b.conn.getRows("batch query", nil)
if !b.mrr.NextResult() {
@@ -162,9 +162,9 @@ func (b *Batch) QueryResults() (*Rows, error) {
// QueryRowResults reads the results from the next query in the batch as if the
// query has been sent with QueryRow.
func (b *Batch) QueryRowResults() *Row {
func (b *Batch) QueryRowResults() Row {
rows, _ := b.QueryResults()
return (*Row)(rows)
return (*connRow)(rows.(*connRows))
}