dataSet

package module
v0.211225.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: MIT Imports: 7 Imported by: 0

README

go-DataSet

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnType

type ColumnType struct {
	*sql.ColumnType
	Index uint16 `json:"index" xml:"index"`
}

ColumnType 列类型

func (*ColumnType) MarshalJSON

func (col *ColumnType) MarshalJSON() ([]byte, error)

MarshalJSON json序列化

func (*ColumnType) MarshalXML

func (col *ColumnType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML xml序列化

func (*ColumnType) String

func (col *ColumnType) String() string

type Data

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

Data data

type DataRow

type DataRow []*Data // 一行数据

func (DataRow) MarshalJSON

func (rd DataRow) MarshalJSON() ([]byte, error)

MarshalJSON json序列化

func (DataRow) MarshalXML

func (rd DataRow) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML xml序列化

type DataSet

type DataSet []*DataTable

func NewDataSetFromRows

func NewDataSetFromRows(sqlRows *sql.Rows) (ds DataSet, err error)

NewDataSetFromRows 从sql.Rows生成DataSet

func (DataSet) MarshalXML

func (ds DataSet) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML xml序列化

func (DataSet) String

func (ds DataSet) String() string

type DataTable

type DataTable struct {
	Columns []*ColumnType `json:"columns" xml:"columns"` // 列
	Rows    []DataRow     `json:"rows" xml:"rows"`       // 行数据
}

func (DataTable) MarshalXML

func (dt DataTable) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML 将DataTable转为xml

func (DataTable) String

func (dt DataTable) String() string

type DateTime

type DateTime struct {
	time.Time
}

DateTime 时间 重命名时间用于格式化输出

func (DateTime) MarshalJSON

func (t DateTime) MarshalJSON() ([]byte, error)

MarshalJSON json序列化

func (DateTime) MarshalXML

func (t DateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML xml序列化

type Param

type Param map[string]interface{}

func (Param) MarshalXML

func (p Param) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML xml序列化

Jump to

Keyboard shortcuts

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