sqldata

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelSQLResultStream

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

func (*ChannelSQLResultStream) Close

func (srs *ChannelSQLResultStream) Close() error

func (*ChannelSQLResultStream) Read

func (srs *ChannelSQLResultStream) Read() (ISQLResult, error)

func (*ChannelSQLResultStream) Write

func (srs *ChannelSQLResultStream) Write(r ISQLResult) error

type ISQLColumn

type ISQLColumn interface {
	GetTableId() int32
	GetName() string
	GetAttrNum() int16
	GetObjectID() uint32
	GetWidth() int16
	GetTypeModifier() int32
	GetFormat() string
}

func NewSQLColumn

func NewSQLColumn(
	table ISQLTable,
	name string,
	attrNum int16,
	objectID uint32,
	width int16,
	typeModifier int32,
	format string,
) ISQLColumn

type ISQLResult

type ISQLResult interface {
	GetColumns() []ISQLColumn
	GetRowsAffected() uint64
	GetInsertId() uint64
	GetRows() []ISQLRow
}

type ISQLResultStream

type ISQLResultStream interface {
	Read() (ISQLResult, error)
	Write(ISQLResult) error
	Close() error
}

func NewChannelSQLResultStream

func NewChannelSQLResultStream() ISQLResultStream

func NewSimpleSQLResultStream

func NewSimpleSQLResultStream(res ISQLResult) ISQLResultStream

type ISQLRow

type ISQLRow interface {
	GetRowDataNaive() []interface{}
	GetRowDataForPgWire() []interface{}
}

func NewSQLRow

func NewSQLRow(rawData []interface{}) ISQLRow

type ISQLTable

type ISQLTable interface {
	GetId() int32
	GetName() string
}

func NewSQLTable

func NewSQLTable(id int32, name string) ISQLTable

type SQLColumn

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

func (*SQLColumn) GetAttrNum

func (sc *SQLColumn) GetAttrNum() int16

func (*SQLColumn) GetFormat

func (sc *SQLColumn) GetFormat() string

func (*SQLColumn) GetName

func (sc *SQLColumn) GetName() string

func (*SQLColumn) GetObjectID

func (sc *SQLColumn) GetObjectID() uint32

func (*SQLColumn) GetTableId

func (sc *SQLColumn) GetTableId() int32

func (*SQLColumn) GetTypeModifier

func (sc *SQLColumn) GetTypeModifier() int32

func (*SQLColumn) GetWidth

func (sc *SQLColumn) GetWidth() int16

type SQLResult

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

func NewSQLResult

func NewSQLResult(
	columns []ISQLColumn,
	rowsAffected uint64,
	insertID uint64,
	rows []ISQLRow,
) *SQLResult

func (*SQLResult) GetColumns

func (sr *SQLResult) GetColumns() []ISQLColumn

func (*SQLResult) GetInsertId

func (sr *SQLResult) GetInsertId() uint64

func (*SQLResult) GetRows

func (sr *SQLResult) GetRows() []ISQLRow

func (*SQLResult) GetRowsAffected

func (sr *SQLResult) GetRowsAffected() uint64

type SQLRow

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

func (*SQLRow) GetRowDataForPgWire

func (sr *SQLRow) GetRowDataForPgWire() []interface{}

func (*SQLRow) GetRowDataNaive

func (sr *SQLRow) GetRowDataNaive() []interface{}

type SQLTable

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

func (*SQLTable) GetId

func (st *SQLTable) GetId() int32

func (*SQLTable) GetName

func (st *SQLTable) GetName() string

type SimpleSQLResultStream

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

func (*SimpleSQLResultStream) Close

func (srs *SimpleSQLResultStream) Close() error

func (*SimpleSQLResultStream) Read

func (srs *SimpleSQLResultStream) Read() (ISQLResult, error)

func (*SimpleSQLResultStream) Write

func (srs *SimpleSQLResultStream) Write(r ISQLResult) error

Jump to

Keyboard shortcuts

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