queryresult

package
v0.15.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	RowChan      *chan *RowResult
	ColTypes     []*sql.ColumnType
	TimingResult chan *TimingResult
}

func NewQueryResult

func NewQueryResult(colTypes []*sql.ColumnType) *Result

func (Result) Close

func (r Result) Close()

Close closes the row channel

func (Result) StreamError

func (r Result) StreamError(err error)

func (Result) StreamRow

func (r Result) StreamRow(rowResult []interface{})

type ResultStreamer

type ResultStreamer struct {
	Results chan *Result
	// contains filtered or unexported fields
}

func NewResultStreamer

func NewResultStreamer() *ResultStreamer

func (*ResultStreamer) AllResultsRead

func (q *ResultStreamer) AllResultsRead()

AllResultsRead is a signal that indicates the all results have been read from the stream

func (*ResultStreamer) Close

func (q *ResultStreamer) Close()

Close closes the result stream

func (*ResultStreamer) StreamResult

func (q *ResultStreamer) StreamResult(result *Result)

StreamResult streams result on the Results channel, then waits for them to be read

type RowResult

type RowResult struct {
	Data  []interface{}
	Error error
}

type SyncQueryResult

type SyncQueryResult struct {
	Rows         []interface{}
	ColTypes     []*sql.ColumnType
	TimingResult *TimingResult
}

type TimingMetadata

type TimingMetadata struct {
	RowsFetched       int64
	CachedRowsFetched int64
	HydrateCalls      int64
}

type TimingResult

type TimingResult struct {
	Duration time.Duration
	Metadata *TimingMetadata
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL