sqlstream

package
v0.0.0-...-9630e16 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2015 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SQLReader

func SQLReader(rows DataRows, recordDelimiter string, lineDelimiter string) io.ReadCloser

SQLReader represents a live output of a Sql query

Types

type DataRows

type DataRows interface {
	Columns() ([]string, error)
	Close() error
	Next() bool
	Err() error
	Scan(dest ...interface{}) error
}

This is all we need from sql.Rows

type SQLStream

type SQLStream struct {
	// contains filtered or unexported fields
}

func NewSQLStream

func NewSQLStream(
	username string,
	password string,
	dbName string,
	host string,
	port int,
	sqlQuery string,
	recordDelimiter string,
	lineDelimiter string) (*SQLStream, error)

func (*SQLStream) ExecuteQuery

func (s *SQLStream) ExecuteQuery() (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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