mysql

package module
v0.0.0-...-286b15c Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: MIT Imports: 21 Imported by: 0

README

Go driver for MariaDB/MySQL server

Documentation

Index

Constants

View Source
const (
	UNKNOWN_EVENT = iota
	START_EVENT_V3
	QUERY_EVENT
	STOP_EVENT
	ROTATE_EVENT
	INTVAR_EVENT
	LOAD_EVENT
	SLAVE_EVENT
	CREATE_FILE_EVENT
	APPEND_BLOCK_EVENT
	EXEC_LOAD_EVENT
	DELETE_FILE_EVENT
	NEW_LOAD_EVENT
	RAND_EVENT
	USER_VAR_EVENT
	FORMAT_DESCRIPTION_EVENT
	XID_EVENT
	BEGIN_LOAD_QUERY_EVENT
	EXECUTE_LOAD_QUERY_EVENT
	TABLE_MAP_EVENT
	PRE_GA_WRITE_ROWS_EVENT
	PRE_GA_UPDATE_ROWS_EVENT
	PRE_GA_DELETE_ROWS_EVENT
	WRITE_ROWS_EVENT_V1
	UPDATE_ROWS_EVENT_V1
	DELETE_ROWS_EVENT_V1
	INCIDENT_EVENT
	HEARTBEAT_LOG_EVENT
	IGNORABLE_LOG_EVENT
	ROWS_QUERY_LOG_EVENT
	WRITE_ROWS_EVENT
	UPDATE_ROWS_EVENT
	DELETE_ROWS_EVENT
	GTID_LOG_EVENT
	ANONYMOUS_GTID_LOG_EVENT
	PREVIOUS_GTIDS_LOG_EVENT
	TRANSACTION_CONTEXT_EVENT
	VIEW_CHANGE_EVENT
	XA_PREPARE_LOG_EVENT

	// MariaDB specific event numbers start from here
	ANNOTATE_ROWS_EVENT     = 160
	BINLOG_CHECKPOINT_EVENT = 161
	GTID_EVENT              = 162
	GTID_LIST_EVENT         = 163
)
View Source
const (
	INCIDENT_NONE        = 0
	INCIDENT_LOST_EVENTS = 1
)
View Source
const (
	INVALID_INT_EVENT = iota
	LAST_INSERT_ID_EVENT
	INSERT_ID_EVENT
)
View Source
const (
	DUMPFILE_FLAG = 1 << iota
	OPT_ENCLOSED_FLAG
	REPLAVE_FLAG
	IGNORE_FLAG
)

OptFlags

View Source
const (
	FIELD_TERM_EMPTY = 1 << iota
	ENCLOSED_EMPTY
	LINE_TERM_EMPTY
	LINE_START_EMPTY
	ESCAPE_EMPTY
)

EmptyFlags

View Source
const (
	FL_STANDALONE = 1 << iota
	FL_GROUP_COMMIT_ID
	FL_TRANSACTIONAL
	FL_ALLOW_PARALLEL
	FL_WAITED
	FL_DDL
)
View Source
const (
	BINLOG_CHECKSUM_ALG_OFF = iota
	BINLOG_CHECKSUM_ALG_CRC32
	BINLOG_CHECKSUM_ALG_END
	BINLOG_CHECKSUM_ALG_UNDEF = 255
)
View Source
const (
	ErrWarning = 0
	ErrUnknown = 9000 + iota
	ErrConnection
	ErrRead
	ErrWrite
	ErrSSLSupport
	ErrSSLConnection
	ErrCompressionSupport
	ErrCompression
	ErrInvalidType
	ErrInvalidDSN
	ErrInvalidProperty
	ErrScheme
	ErrCursor
	ErrFile
	ErrInvalidPacket
	ErrInvalidPropertyValue
	ErrNetPacketTooLarge
	ErrNetPacketsOutOfOrder
	ErrEventChecksumFailure
)

client error codes

View Source
const (
	REFRESH_GRANT   = 0x01
	REFRESH_LOG     = 0x02
	REFRESH_TABLES  = 0x04
	REFRESH_HOSTS   = 0x08
	REFRESH_STATUS  = 0x10
	REFRESH_SLAVE   = 0x20
	REFRESH_THREADS = 0x40
	REFRESH_MASTER  = 0x80
)

refresh flags (exported)

View Source
const UNSIGNED = 1

Variables

View Source
var (
	// MaxTime is the maximum allowable TIMESTAMP value in MySQL '2038-01-19 03:14:07 UTC'
	MaxTime time.Time = time.Date(2038, time.January, 19, 3, 14, 7, 0, time.UTC)
	// MinTime is the minimum allowable TIMESTAMP value in MySQL '1970-01-01 00:00:01' UTC'
	MinTime time.Time = time.Date(1970, time.January, 01, 0, 0, 1, 0, time.UTC)

	// MaxDuration is the maximum allowable TIME value in MySQL '838:59:59.000000'
	MaxDuration time.Duration = 838*time.Hour + 59*time.Minute + 59*time.Second
	// MinDuration is the minimun allowable TIME value in MySQL '-838:59:59.000000'
	MinDuration time.Duration = -1 * MaxDuration

	InvalidTime     time.Time     = MaxTime.Add(1 * time.Second)
	InvalidDuration time.Duration = MaxDuration + 1*time.Second
)

Functions

This section is empty.

Types

type AnnotateRowsEvent

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

ANNOTATE_ROWS_EVENT

func (*AnnotateRowsEvent) Position

func (e *AnnotateRowsEvent) Position() uint32

func (*AnnotateRowsEvent) Query

func (e *AnnotateRowsEvent) Query() string

func (*AnnotateRowsEvent) ServerId

func (e *AnnotateRowsEvent) ServerId() uint32

func (*AnnotateRowsEvent) Size

func (e *AnnotateRowsEvent) Size() uint32

func (*AnnotateRowsEvent) Time

func (e *AnnotateRowsEvent) Time() time.Time

func (*AnnotateRowsEvent) Type

func (e *AnnotateRowsEvent) Type() uint8

type AppendBlockEvent

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

APPEND_BLOCK_EVENT

func (*AppendBlockEvent) Data

func (e *AppendBlockEvent) Data() []byte

func (*AppendBlockEvent) FieldId

func (e *AppendBlockEvent) FieldId() uint32

func (*AppendBlockEvent) Position

func (e *AppendBlockEvent) Position() uint32

func (*AppendBlockEvent) ServerId

func (e *AppendBlockEvent) ServerId() uint32

func (*AppendBlockEvent) Size

func (e *AppendBlockEvent) Size() uint32

func (*AppendBlockEvent) Time

func (e *AppendBlockEvent) Time() time.Time

func (*AppendBlockEvent) Type

func (e *AppendBlockEvent) Type() uint8

type BeginLoadQueryEvent

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

BEGIN_LOAD_QUERY_EVENT

func (*BeginLoadQueryEvent) Data

func (e *BeginLoadQueryEvent) Data() []byte

func (*BeginLoadQueryEvent) FileId

func (e *BeginLoadQueryEvent) FileId() uint32

func (*BeginLoadQueryEvent) Position

func (e *BeginLoadQueryEvent) Position() uint32

func (*BeginLoadQueryEvent) ServerId

func (e *BeginLoadQueryEvent) ServerId() uint32

func (*BeginLoadQueryEvent) Size

func (e *BeginLoadQueryEvent) Size() uint32

func (*BeginLoadQueryEvent) Time

func (e *BeginLoadQueryEvent) Time() time.Time

func (*BeginLoadQueryEvent) Type

func (e *BeginLoadQueryEvent) Type() uint8

type Binlog

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

Binlog represents the binlog context

func (*Binlog) Begin

func (b *Binlog) Begin() error

func (*Binlog) Close

func (b *Binlog) Close() error

func (*Binlog) Connect

func (b *Binlog) Connect(dsn string) error

func (*Binlog) Error

func (b *Binlog) Error() error

func (*Binlog) GetFile

func (b *Binlog) GetFile() string

func (*Binlog) GetPosition

func (b *Binlog) GetPosition() uint32

func (*Binlog) Next

func (b *Binlog) Next() bool

func (*Binlog) RawEvent

func (b *Binlog) RawEvent() (re RawEvent, err error)

func (*Binlog) SetFile

func (b *Binlog) SetFile(file string)

func (*Binlog) SetPosition

func (b *Binlog) SetPosition(position uint32)

type BinlogCheckpointEvent

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

BINLOG_CHECKPOINT_EVENT

func (*BinlogCheckpointEvent) File

func (e *BinlogCheckpointEvent) File() string

func (*BinlogCheckpointEvent) FileLength

func (e *BinlogCheckpointEvent) FileLength() uint32

func (*BinlogCheckpointEvent) Position

func (e *BinlogCheckpointEvent) Position() uint32

func (*BinlogCheckpointEvent) ServerId

func (e *BinlogCheckpointEvent) ServerId() uint32

func (*BinlogCheckpointEvent) Size

func (e *BinlogCheckpointEvent) Size() uint32

func (*BinlogCheckpointEvent) Time

func (e *BinlogCheckpointEvent) Time() time.Time

func (*BinlogCheckpointEvent) Type

func (e *BinlogCheckpointEvent) Type() uint8

type ColumnDefinition

type ColumnDefinition struct {
	Catalog             nullString
	Schema              nullString
	Table               nullString
	OrgTable            nullString
	Name                nullString
	OrgName             nullString
	FixedLenFieldLength uint64
	Charset             uint16
	ColumnLength        uint32
	ColumnType          uint8
	Flags               uint16
	Decimals            uint8
	DefaultValues       nullString
}

type Conn

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

func (*Conn) Begin

func (c *Conn) Begin() (driver.Tx, error)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Exec

func (c *Conn) Exec(query string, args []driver.Value) (driver.Result, error)

func (*Conn) Prepare

func (c *Conn) Prepare(query string) (driver.Stmt, error)

func (*Conn) Query

func (c *Conn) Query(query string, args []driver.Value) (driver.Rows, error)

type CreateFileEvent

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

CREATE_FILE_EVENT

func (*CreateFileEvent) Data

func (e *CreateFileEvent) Data() []byte

func (*CreateFileEvent) FileId

func (e *CreateFileEvent) FileId() uint32

func (*CreateFileEvent) Position

func (e *CreateFileEvent) Position() uint32

func (*CreateFileEvent) ServerId

func (e *CreateFileEvent) ServerId() uint32

func (*CreateFileEvent) Size

func (e *CreateFileEvent) Size() uint32

func (*CreateFileEvent) Time

func (e *CreateFileEvent) Time() time.Time

func (*CreateFileEvent) Type

func (e *CreateFileEvent) Type() uint8

type DefaultParameterConverter

type DefaultParameterConverter struct{}

func (DefaultParameterConverter) ConvertValue

func (DefaultParameterConverter) ConvertValue(v interface{}) (driver.Value, error)

type DeleteFileEvent

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

DELETE_FILE_EVENT

func (*DeleteFileEvent) FileId

func (e *DeleteFileEvent) FileId() uint32

func (*DeleteFileEvent) Position

func (e *DeleteFileEvent) Position() uint32

func (*DeleteFileEvent) ServerId

func (e *DeleteFileEvent) ServerId() uint32

func (*DeleteFileEvent) Size

func (e *DeleteFileEvent) Size() uint32

func (*DeleteFileEvent) Time

func (e *DeleteFileEvent) Time() time.Time

func (*DeleteFileEvent) Type

func (e *DeleteFileEvent) Type() uint8

type Driver

type Driver struct {
}

func (Driver) Open

func (d Driver) Open(dsn string) (driver.Conn, error)

type Error

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

func (*Error) Code

func (e *Error) Code() uint16

Code returns the error number.

func (*Error) Error

func (e *Error) Error() string

Error returns the formatted error message. (also required by Go's error interface)

func (*Error) Message

func (e *Error) Message() string

Message returns the error message.

func (*Error) SqlState

func (e *Error) SqlState() string

SqlState returns the SQL STATE

func (*Error) Warnings

func (e *Error) Warnings() uint16

func (*Error) When

func (e *Error) When() time.Time

When returns time when error occurred.

type Event

type Event interface {
	Time() time.Time
	Type() uint8
	ServerId() uint32
	Size() uint32
	Position() uint32
}

type EventColumn

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

type EventColumns

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

type EventRow

type EventRow struct {
	Columns []interface{}
}

type EventRows

type EventRows struct {
	Rows []EventRow
	// contains filtered or unexported fields
}

type ExecLoadEvent

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

EXEC_LOAD_EVENT

func (*ExecLoadEvent) FileId

func (e *ExecLoadEvent) FileId() uint32

func (*ExecLoadEvent) Position

func (e *ExecLoadEvent) Position() uint32

func (*ExecLoadEvent) ServerId

func (e *ExecLoadEvent) ServerId() uint32

func (*ExecLoadEvent) Size

func (e *ExecLoadEvent) Size() uint32

func (*ExecLoadEvent) Time

func (e *ExecLoadEvent) Time() time.Time

func (*ExecLoadEvent) Type

func (e *ExecLoadEvent) Type() uint8

type ExecuteLoadQueryEvent

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

EXECUTE_LOAD_QUERY_EVENT

func (*ExecuteLoadQueryEvent) Position

func (e *ExecuteLoadQueryEvent) Position() uint32

func (*ExecuteLoadQueryEvent) ServerId

func (e *ExecuteLoadQueryEvent) ServerId() uint32

func (*ExecuteLoadQueryEvent) Size

func (e *ExecuteLoadQueryEvent) Size() uint32

func (*ExecuteLoadQueryEvent) Time

func (e *ExecuteLoadQueryEvent) Time() time.Time

func (*ExecuteLoadQueryEvent) Type

func (e *ExecuteLoadQueryEvent) Type() uint8

type FormatDescriptionEvent

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

FORMAT_DESCRIPTION_EVENT

func (*FormatDescriptionEvent) BinlogVersion

func (e *FormatDescriptionEvent) BinlogVersion() uint16

func (*FormatDescriptionEvent) ChecksumAlgorithm

func (e *FormatDescriptionEvent) ChecksumAlgorithm() uint8

func (*FormatDescriptionEvent) CreationTime

func (e *FormatDescriptionEvent) CreationTime() time.Time

func (*FormatDescriptionEvent) Position

func (e *FormatDescriptionEvent) Position() uint32

func (*FormatDescriptionEvent) ServerId

func (e *FormatDescriptionEvent) ServerId() uint32

func (*FormatDescriptionEvent) ServerVersion

func (e *FormatDescriptionEvent) ServerVersion() string

func (*FormatDescriptionEvent) Size

func (e *FormatDescriptionEvent) Size() uint32

func (*FormatDescriptionEvent) Time

func (e *FormatDescriptionEvent) Time() time.Time

func (*FormatDescriptionEvent) Type

func (e *FormatDescriptionEvent) Type() uint8

type GtidEvent

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

GTID_EVENT

func (*GtidEvent) CommitId

func (e *GtidEvent) CommitId() uint64

func (*GtidEvent) Flags

func (e *GtidEvent) Flags() uint8

func (*GtidEvent) Gtid

func (e *GtidEvent) Gtid() MariadbGtid

func (*GtidEvent) Position

func (e *GtidEvent) Position() uint32

func (*GtidEvent) ServerId

func (e *GtidEvent) ServerId() uint32

func (*GtidEvent) Size

func (e *GtidEvent) Size() uint32

func (*GtidEvent) String

func (e *GtidEvent) String() string

func (*GtidEvent) Time

func (e *GtidEvent) Time() time.Time

func (*GtidEvent) Type

func (e *GtidEvent) Type() uint8

type GtidListEvent

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

GTID_LIST_EVENT

func (*GtidListEvent) Count

func (e *GtidListEvent) Count() uint32

func (*GtidListEvent) Flags

func (e *GtidListEvent) Flags() uint8

func (*GtidListEvent) List

func (e *GtidListEvent) List() []MariadbGtid

func (*GtidListEvent) Position

func (e *GtidListEvent) Position() uint32

func (*GtidListEvent) ServerId

func (e *GtidListEvent) ServerId() uint32

func (*GtidListEvent) Size

func (e *GtidListEvent) Size() uint32

func (*GtidListEvent) Time

func (e *GtidListEvent) Time() time.Time

func (*GtidListEvent) Type

func (e *GtidListEvent) Type() uint8

type GtidLogEvent

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

func (*GtidLogEvent) Gtid

func (e *GtidLogEvent) Gtid() MysqlGtid

func (*GtidLogEvent) Position

func (e *GtidLogEvent) Position() uint32

func (*GtidLogEvent) ServerId

func (e *GtidLogEvent) ServerId() uint32

func (*GtidLogEvent) Size

func (e *GtidLogEvent) Size() uint32

func (*GtidLogEvent) String

func (e *GtidLogEvent) String() string

func (*GtidLogEvent) Time

func (e *GtidLogEvent) Time() time.Time

func (*GtidLogEvent) Type

func (e *GtidLogEvent) Type() uint8

type HeartbeatLogEvent

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

HEARTBEAT_LOG_EVENT

func (*HeartbeatLogEvent) Position

func (e *HeartbeatLogEvent) Position() uint32

func (*HeartbeatLogEvent) ServerId

func (e *HeartbeatLogEvent) ServerId() uint32

func (*HeartbeatLogEvent) Size

func (e *HeartbeatLogEvent) Size() uint32

func (*HeartbeatLogEvent) Time

func (e *HeartbeatLogEvent) Time() time.Time

func (*HeartbeatLogEvent) Type

func (e *HeartbeatLogEvent) Type() uint8

type IgnorableLogEvent

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

IGNORABLE_LOG_EVENT

func (*IgnorableLogEvent) Position

func (e *IgnorableLogEvent) Position() uint32

func (*IgnorableLogEvent) ServerId

func (e *IgnorableLogEvent) ServerId() uint32

func (*IgnorableLogEvent) Size

func (e *IgnorableLogEvent) Size() uint32

func (*IgnorableLogEvent) Time

func (e *IgnorableLogEvent) Time() time.Time

func (*IgnorableLogEvent) Type

func (e *IgnorableLogEvent) Type() uint8

type IncidentEvent

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

INCIDENT_EVENT

func (*IncidentEvent) IncidentMessage

func (e *IncidentEvent) IncidentMessage() string

func (*IncidentEvent) IncidentType

func (e *IncidentEvent) IncidentType() uint16

func (*IncidentEvent) Position

func (e *IncidentEvent) Position() uint32

func (*IncidentEvent) ServerId

func (e *IncidentEvent) ServerId() uint32

func (*IncidentEvent) Size

func (e *IncidentEvent) Size() uint32

func (*IncidentEvent) Time

func (e *IncidentEvent) Time() time.Time

func (*IncidentEvent) Type

func (e *IncidentEvent) Type() uint8

type IntvarEvent

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

INTVAR_EVENT

func (*IntvarEvent) IntvarType

func (e *IntvarEvent) IntvarType() uint8

func (*IntvarEvent) Position

func (e *IntvarEvent) Position() uint32

func (*IntvarEvent) ServerId

func (e *IntvarEvent) ServerId() uint32

func (*IntvarEvent) Size

func (e *IntvarEvent) Size() uint32

func (*IntvarEvent) Time

func (e *IntvarEvent) Time() time.Time

func (*IntvarEvent) Type

func (e *IntvarEvent) Type() uint8

func (*IntvarEvent) Value

func (e *IntvarEvent) Value() uint64

type LoadEvent

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

LOAD_EVENT

func (*LoadEvent) EmptyFlags

func (e *LoadEvent) EmptyFlags() uint8

func (*LoadEvent) EnclosedBy

func (e *LoadEvent) EnclosedBy() string

func (*LoadEvent) EscapedBy

func (e *LoadEvent) EscapedBy() string

func (*LoadEvent) ExecutionTime

func (e *LoadEvent) ExecutionTime() time.Time

func (*LoadEvent) FieldCount

func (e *LoadEvent) FieldCount() uint32

func (*LoadEvent) FieldTerminator

func (e *LoadEvent) FieldTerminator() string

func (*LoadEvent) Fields

func (e *LoadEvent) Fields() []string

func (*LoadEvent) File

func (e *LoadEvent) File() string

func (*LoadEvent) LineStart

func (e *LoadEvent) LineStart() string

func (*LoadEvent) LineTerminator

func (e *LoadEvent) LineTerminator() string

func (*LoadEvent) OptFlags

func (e *LoadEvent) OptFlags() []byte

func (*LoadEvent) Position

func (e *LoadEvent) Position() uint32

func (*LoadEvent) Schema

func (e *LoadEvent) Schema() string

func (*LoadEvent) ServerId

func (e *LoadEvent) ServerId() uint32

func (*LoadEvent) Size

func (e *LoadEvent) Size() uint32

func (*LoadEvent) SkipLines

func (e *LoadEvent) SkipLines() uint32

func (*LoadEvent) SlaveProxyId

func (e *LoadEvent) SlaveProxyId() uint32

func (*LoadEvent) Table

func (e *LoadEvent) Table() string

func (*LoadEvent) Time

func (e *LoadEvent) Time() time.Time

func (*LoadEvent) Type

func (e *LoadEvent) Type() uint8

type MariadbGtid

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

func (*MariadbGtid) DomainId

func (gtid *MariadbGtid) DomainId() uint32

func (*MariadbGtid) Seqno

func (gtid *MariadbGtid) Seqno() uint64

func (*MariadbGtid) ServerId

func (gtid *MariadbGtid) ServerId() uint32

func (*MariadbGtid) String

func (gtid *MariadbGtid) String() string

type MyShutdownLevel

type MyShutdownLevel uint8
const (
	SHUTDOWN_DEFAULT               MyShutdownLevel = 0x00
	SHUTDOWN_WAIT_CONNECTIONS      MyShutdownLevel = 0x01
	SHUTDOWN_WAIT_TRANSACTIONS     MyShutdownLevel = 0x02
	SHUTDOWN_WAIT_UPDATES          MyShutdownLevel = 0x08
	SHUTDOWN_WAIT_ALL_BUFFERS      MyShutdownLevel = 0x10
	SHUTDOWN_WAIT_CRITICAL_BUFFERS MyShutdownLevel = 0x11
	SHUTDOWN_KILL_QUERY            MyShutdownLevel = 0xfe
	SHUTDOWN_KILL_CONNECTIONS      MyShutdownLevel = 0xff
)

shutdown flags (exported)

type MysqlGtid

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

func (*MysqlGtid) GroupNumber

func (gtid *MysqlGtid) GroupNumber() int64

func (*MysqlGtid) SourceId

func (gtid *MysqlGtid) SourceId() UUID

func (*MysqlGtid) String

func (gtid *MysqlGtid) String() string

type NullDuration

type NullDuration struct {
	Duration time.Duration
	Valid    bool
}

func (*NullDuration) Scan

func (nd *NullDuration) Scan(value interface{}) error

Scan implements the scanner interface.

func (NullDuration) Value

func (nd NullDuration) Value() (driver.Value, error)

Value implements the driver's Valuer interface.

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool
}

NullTime represents a Time type the may be null.

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver's Valuer interface.

type PreviousGtidsLogEvent

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

func (*PreviousGtidsLogEvent) Position

func (e *PreviousGtidsLogEvent) Position() uint32

func (*PreviousGtidsLogEvent) ServerId

func (e *PreviousGtidsLogEvent) ServerId() uint32

func (*PreviousGtidsLogEvent) Size

func (e *PreviousGtidsLogEvent) Size() uint32

func (*PreviousGtidsLogEvent) String

func (e *PreviousGtidsLogEvent) String() string

func (*PreviousGtidsLogEvent) Time

func (e *PreviousGtidsLogEvent) Time() time.Time

func (*PreviousGtidsLogEvent) Type

func (e *PreviousGtidsLogEvent) Type() uint8

type QueryEvent

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

QUERY_EVENT

func (*QueryEvent) Error

func (e *QueryEvent) Error() uint16

func (*QueryEvent) ExecutionTime

func (e *QueryEvent) ExecutionTime() time.Time

func (*QueryEvent) Position

func (e *QueryEvent) Position() uint32

func (*QueryEvent) Query

func (e *QueryEvent) Query() string

func (*QueryEvent) Schema

func (e *QueryEvent) Schema() string

func (*QueryEvent) ServerId

func (e *QueryEvent) ServerId() uint32

func (*QueryEvent) Size

func (e *QueryEvent) Size() uint32

func (*QueryEvent) SlaveProxyId

func (e *QueryEvent) SlaveProxyId() uint32

func (*QueryEvent) StatusVars

func (e *QueryEvent) StatusVars() string

func (*QueryEvent) Time

func (e *QueryEvent) Time() time.Time

func (*QueryEvent) Type

func (e *QueryEvent) Type() uint8

type RandEvent

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

RAND_EVENT

func (*RandEvent) Position

func (e *RandEvent) Position() uint32

func (*RandEvent) Seed1

func (e *RandEvent) Seed1() uint64

func (*RandEvent) Seed2

func (e *RandEvent) Seed2() uint64

func (*RandEvent) ServerId

func (e *RandEvent) ServerId() uint32

func (*RandEvent) Size

func (e *RandEvent) Size() uint32

func (*RandEvent) Time

func (e *RandEvent) Time() time.Time

func (*RandEvent) Type

func (e *RandEvent) Type() uint8

type RawEvent

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

func (*RawEvent) Body

func (e *RawEvent) Body() []byte

func (*RawEvent) Event

func (re *RawEvent) Event() Event

func (*RawEvent) Name

func (e *RawEvent) Name() string

func (*RawEvent) Position

func (e *RawEvent) Position() uint32

func (*RawEvent) ServerId

func (e *RawEvent) ServerId() uint32

func (*RawEvent) Size

func (e *RawEvent) Size() uint32

func (*RawEvent) Time

func (e *RawEvent) Time() time.Time

func (*RawEvent) Type

func (e *RawEvent) Type() uint8

type Result

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

func (*Result) LastInsertId

func (r *Result) LastInsertId() (int64, error)

func (*Result) RowsAffected

func (r *Result) RowsAffected() (int64, error)

type RotateEvent

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

ROTATE_EVENT

func (*RotateEvent) NextFile

func (e *RotateEvent) NextFile() string

func (*RotateEvent) NextPosition

func (e *RotateEvent) NextPosition() uint64

func (*RotateEvent) Position

func (e *RotateEvent) Position() uint32

func (*RotateEvent) ServerId

func (e *RotateEvent) ServerId() uint32

func (*RotateEvent) Size

func (e *RotateEvent) Size() uint32

func (*RotateEvent) Time

func (e *RotateEvent) Time() time.Time

func (*RotateEvent) Type

func (e *RotateEvent) Type() uint8

type Rows

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

func (*Rows) Close

func (r *Rows) Close() error

func (*Rows) Columns

func (r *Rows) Columns() []string

func (*Rows) Next

func (r *Rows) Next(dest []driver.Value) error

type RowsEvent

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

func (*RowsEvent) AfterImage

func (e *RowsEvent) AfterImage() EventRows

func (*RowsEvent) Image

func (e *RowsEvent) Image() EventRows

func (*RowsEvent) Position

func (e *RowsEvent) Position() uint32

func (*RowsEvent) ServerId

func (e *RowsEvent) ServerId() uint32

func (*RowsEvent) Size

func (e *RowsEvent) Size() uint32

func (*RowsEvent) Time

func (e *RowsEvent) Time() time.Time

func (*RowsEvent) Type

func (e *RowsEvent) Type() uint8

type RowsQueryLogEvent

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

ROWS_QUERY_LOG_EVENT

func (*RowsQueryLogEvent) Position

func (e *RowsQueryLogEvent) Position() uint32

func (*RowsQueryLogEvent) Query

func (e *RowsQueryLogEvent) Query() string

func (*RowsQueryLogEvent) ServerId

func (e *RowsQueryLogEvent) ServerId() uint32

func (*RowsQueryLogEvent) Size

func (e *RowsQueryLogEvent) Size() uint32

func (*RowsQueryLogEvent) Time

func (e *RowsQueryLogEvent) Time() time.Time

func (*RowsQueryLogEvent) Type

func (e *RowsQueryLogEvent) Type() uint8

type SlaveEvent

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

SLAVE_EVENT

func (*SlaveEvent) MasterHost

func (e *SlaveEvent) MasterHost() string

func (*SlaveEvent) MasterLog

func (e *SlaveEvent) MasterLog() string

func (*SlaveEvent) MasterPort

func (e *SlaveEvent) MasterPort() uint16

func (*SlaveEvent) MasterPosition

func (e *SlaveEvent) MasterPosition() uint64

func (*SlaveEvent) Position

func (e *SlaveEvent) Position() uint32

func (*SlaveEvent) ServerId

func (e *SlaveEvent) ServerId() uint32

func (*SlaveEvent) Size

func (e *SlaveEvent) Size() uint32

func (*SlaveEvent) Time

func (e *SlaveEvent) Time() time.Time

func (*SlaveEvent) Type

func (e *SlaveEvent) Type() uint8

type StartEventV3

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

START_EVENT_V3

func (*StartEventV3) BinlogVersion

func (e *StartEventV3) BinlogVersion() uint16

func (*StartEventV3) CreationTime

func (e *StartEventV3) CreationTime() time.Time

func (*StartEventV3) Position

func (e *StartEventV3) Position() uint32

func (*StartEventV3) ServerId

func (e *StartEventV3) ServerId() uint32

func (*StartEventV3) ServerVersion

func (e *StartEventV3) ServerVersion() string

func (*StartEventV3) Size

func (e *StartEventV3) Size() uint32

func (*StartEventV3) Time

func (e *StartEventV3) Time() time.Time

func (*StartEventV3) Type

func (e *StartEventV3) Type() uint8

type Stmt

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

func (*Stmt) Close

func (s *Stmt) Close() error

func (*Stmt) ColumnConverter

func (s *Stmt) ColumnConverter(idx int) driver.ValueConverter

func (*Stmt) Exec

func (s *Stmt) Exec(args []driver.Value) (driver.Result, error)

func (*Stmt) NumInput

func (s *Stmt) NumInput() int

func (*Stmt) Query

func (s *Stmt) Query(args []driver.Value) (driver.Rows, error)

type StopEvent

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

STOP_EVENT

func (*StopEvent) Position

func (e *StopEvent) Position() uint32

func (*StopEvent) ServerId

func (e *StopEvent) ServerId() uint32

func (*StopEvent) Size

func (e *StopEvent) Size() uint32

func (*StopEvent) Time

func (e *StopEvent) Time() time.Time

func (*StopEvent) Type

func (e *StopEvent) Type() uint8

type TableMapEvent

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

TABLE_MAP_EVENT

func (*TableMapEvent) ColumnCount

func (e *TableMapEvent) ColumnCount() uint64

func (*TableMapEvent) Flags

func (e *TableMapEvent) Flags() uint16

func (*TableMapEvent) Position

func (e *TableMapEvent) Position() uint32

func (*TableMapEvent) Schema

func (e *TableMapEvent) Schema() string

func (*TableMapEvent) ServerId

func (e *TableMapEvent) ServerId() uint32

func (*TableMapEvent) Size

func (e *TableMapEvent) Size() uint32

func (*TableMapEvent) Table

func (e *TableMapEvent) Table() string

func (*TableMapEvent) TableId

func (e *TableMapEvent) TableId() uint64

func (*TableMapEvent) Time

func (e *TableMapEvent) Time() time.Time

func (*TableMapEvent) Type

func (e *TableMapEvent) Type() uint8

type Tx

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

func (*Tx) Commit

func (t *Tx) Commit() error

func (*Tx) Rollback

func (t *Tx) Rollback() error

type UUID

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

func (*UUID) String

func (uuid *UUID) String() string

String converts UUID data to readable string.

type UserVarEvent

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

USER_VAR_EVENT

func (*UserVarEvent) Name

func (e *UserVarEvent) Name() string

func (*UserVarEvent) Position

func (e *UserVarEvent) Position() uint32

func (*UserVarEvent) ServerId

func (e *UserVarEvent) ServerId() uint32

func (*UserVarEvent) Size

func (e *UserVarEvent) Size() uint32

func (*UserVarEvent) Time

func (e *UserVarEvent) Time() time.Time

func (*UserVarEvent) Type

func (e *UserVarEvent) Type() uint8

func (*UserVarEvent) Value

func (e *UserVarEvent) Value() interface{}

type XidEvent

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

XID_EVENT

func (*XidEvent) Position

func (e *XidEvent) Position() uint32

func (*XidEvent) ServerId

func (e *XidEvent) ServerId() uint32

func (*XidEvent) Size

func (e *XidEvent) Size() uint32

func (*XidEvent) Time

func (e *XidEvent) Time() time.Time

func (*XidEvent) Type

func (e *XidEvent) Type() uint8

func (*XidEvent) Xid

func (e *XidEvent) Xid() uint64

Jump to

Keyboard shortcuts

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