Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnDef ¶
type ColumnDef struct { Name string `json:"name"` DataType string `json:"data_type"` OriginalName string `json:"original_name,omitempty"` // contains filtered or unexported fields }
ColumnDef is a struct used to store column information from query results
type Result ¶
type Result[T TimingContainer] struct { RowChan chan *RowResult Cols []*ColumnDef Timing T }
func NewResult ¶
func NewResult[T TimingContainer](cols []*ColumnDef, emptyTiming T) *Result[T]
func (*Result[T]) IsExportSourceData ¶
func (*Result[T]) IsExportSourceData()
IsExportSourceData implements ExportSourceData
func (*Result[T]) StreamError ¶
type ResultStreamer ¶
type ResultStreamer[T TimingContainer] struct { Results chan *Result[T] // contains filtered or unexported fields }
func NewResultStreamer ¶
func NewResultStreamer[T TimingContainer]() *ResultStreamer[T]
func (*ResultStreamer[T]) AllResultsRead ¶
func (q *ResultStreamer[T]) AllResultsRead()
AllResultsRead is a signal that indicates the all results have been read from the stream
func (*ResultStreamer[T]) Close ¶
func (q *ResultStreamer[T]) Close()
Close closes the result stream
func (*ResultStreamer[T]) StreamResult ¶
func (q *ResultStreamer[T]) StreamResult(result *Result[T])
StreamResult streams result on the Results channel, then waits for them to be read
type SyncQueryResult ¶
type TimingContainer ¶ added in v1.6.0
type TimingContainer interface {
GetTiming() any
}
TimingContainer is an interface that allows us to parameterize the Result struct it must handle case of a query returning a stream of timing data OR a timing data struct directly the GetTiming func is used to populate the timing data in the JSON output (as we cannot serialise a stream!)
type TimingMetadata ¶
Click to show internal directories.
Click to hide internal directories.