Documentation ¶
Index ¶
- Constants
- type Chunk
- type Column
- func (c *Column) GetBytes(rowID int) []byte
- func (c *Column) GetDecimal(rowID int) *types.MyDecimal
- func (c *Column) GetDuration(rowID int, fillFsp int) types.Duration
- func (c *Column) GetEnum(rowID int) types.Enum
- func (c *Column) GetFloat32(rowID int) float32
- func (c *Column) GetFloat64(rowID int) float64
- func (c *Column) GetInt64(rowID int) int64
- func (c *Column) GetSet(rowID int) types.Set
- func (c *Column) GetString(rowID int) string
- func (c *Column) GetTime(rowID int) types.Time
- func (c *Column) GetUint64(rowID int) uint64
- func (c *Column) IsNull(rowIdx int) bool
- type ExecuteResult
- type Field
- type ResultSet
- func (c ResultSet) ColumnCount() uint32
- func (c ResultSet) Columns() []string
- func (rs *ResultSet) GetRow(rowIndex int) Row
- func (c ResultSet) LastInsertID() uint64
- func (c ResultSet) RowNumber() int
- func (rs *ResultSet) ToExecuteResult() (*ExecuteResult, error)
- func (c ResultSet) UpdatedCount() uint32
- type Row
- func (r Row) Chunk() *Chunk
- func (r Row) GetBytes(colIdx int) []byte
- func (r Row) GetDecimal(colIdx int) *types.MyDecimal
- func (r Row) GetDuration(colIdx int, fillFsp int) types.Duration
- func (r Row) GetEnum(colIdx int) types.Enum
- func (r Row) GetFloat32(colIdx int) float32
- func (r Row) GetFloat64(colIdx int) float64
- func (r Row) GetInt16(colIdx int) int16
- func (r Row) GetInt32(colIdx int) int32
- func (r Row) GetInt64(colIdx int) int64
- func (r Row) GetInt8(colIdx int) int8
- func (r Row) GetSet(colIdx int) types.Set
- func (r Row) GetString(colIdx int) string
- func (r Row) GetTime(colIdx int) types.Time
- func (r Row) GetUint16(colIdx int) uint16
- func (r Row) GetUint32(colIdx int) uint32
- func (r Row) GetUint64(colIdx int) uint64
- func (r Row) GetUint8(colIdx int) uint8
- func (r Row) Idx() int
- func (r Row) IsEmpty() bool
- func (r Row) IsNull(colIdx int) bool
- func (r Row) Len() int
Constants ¶
const ( SizeInt64 = int(unsafe.Sizeof(int64(0))) SizeUint64 = int(unsafe.Sizeof(uint64(0))) SizeFloat32 = int(unsafe.Sizeof(float32(0))) SizeFloat64 = int(unsafe.Sizeof(float64(0))) SizeGoDuration = int(unsafe.Sizeof(time.Duration(0))) SizeTime = int(unsafe.Sizeof(types.ZeroTime)) )
nolint will use later
const (
RawSql = 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct {
// contains filtered or unexported fields
}
Chunk stores multiple rows of data in Apache Arrow format. See https://arrow.apache.org/docs/memory_layout.html Values are appended in compact format and can be directly accessed without decoding. When the chunk is done processing, we can reuse the allocated memory by resetting it.
func NewChunkWithColumn ¶
NewChunkWithColumn create a empty chunk to resultChunk
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
Column stores one column of data in Apache Arrow format. See https://arrow.apache.org/docs/memory_layout.html
func NewColumnWithData ¶
NewColumnWithData create a new column with data、nullBitmap and offsets
func (*Column) GetDecimal ¶
GetDecimal returns the decimal in the specific row.
func (*Column) GetDuration ¶
GetDuration returns the Duration in the specific row.
func (*Column) GetFloat32 ¶
GetFloat32 returns the float32 in the specific row.
func (*Column) GetFloat64 ¶
GetFloat64 returns the float64 in the specific row.
type ExecuteResult ¶
type ExecuteResult struct { ColumnCount uint32 `json:"column_count"` LastInsertID uint64 `json:"last_insert_id"` UpdatedCount uint32 `json:"updated_count"` Columns []string `json:"columns"` RowNumber int `json:"row_number"` Result [][]interface{} `json:"result"` }
func (ExecuteResult) String ¶
func (rs ExecuteResult) String() string
type ResultSet ¶
type ResultSet struct {
// contains filtered or unexported fields
}
func DecodeRecordSet ¶
DecodeRecordSet use this method to decode call ret to a ResultSet Object
func (ResultSet) ColumnCount ¶
func (ResultSet) LastInsertID ¶
func (*ResultSet) ToExecuteResult ¶
func (rs *ResultSet) ToExecuteResult() (*ExecuteResult, error)
func (ResultSet) UpdatedCount ¶
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row represents a row of data, can be used to access values.
func (Row) GetDecimal ¶
GetDecimal returns the MyDecimal value with the colIdx.
func (Row) GetDuration ¶
GetDuration returns the Duration value with the colIdx.
func (Row) GetFloat32 ¶
GetFloat32 returns the float32 value with the colIdx.
func (Row) GetFloat64 ¶
GetFloat64 returns the float64 value with the colIdx.