Documentation ¶
Index ¶
Constants ¶
View Source
const ( VT_DECIMAL = 0 VT_TINY = 1 VT_SHORT = 2 VT_LONG = 3 VT_FLOAT = 4 VT_DOUBLE = 5 VT_NULL = 6 VT_TIMESTAMP = 7 VT_LONGLONG = 8 VT_INT24 = 9 VT_DATE = 10 VT_TIME = 11 VT_DATETIME = 12 VT_YEAR = 13 VT_NEWDATE = 14 VT_VARCHAR = 15 VT_BIT = 16 VT_NEWDECIMAL = 246 VT_ENUM = 247 VT_SET = 248 VT_TINY_BLOB = 249 VT_MEDIUM_BLOB = 250 VT_LONG_BLOB = 251 VT_BLOB = 252 VT_VAR_STRING = 253 VT_STRING = 254 VT_GEOMETRY = 255 )
These numbers should exactly match values defined in dist/mysql-5.1.52/include/mysql/mysql_com.h
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Charset ¶
type Charset struct { Client int // @@session.character_set_client Conn int // @@session.collation_connection Server int // @@session.collation_server }
Charset contains the per-statement character set settings that accompany binlog QUERY_EVENT entries.
func (*Charset) MarshalBson ¶
func (charset *Charset) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes Charset.
type Field ¶
Field described a column returned by mysql
func (*Field) MarshalBson ¶
func (field *Field) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes Field.
type QueryResult ¶
type QueryResult struct { Fields []Field RowsAffected uint64 InsertId uint64 Rows [][]sqltypes.Value }
QueryResult is the structure returned by the mysql library. When transmitted over the wire, the Rows all come back as strings and lose their original sqltypes. use Fields.Type to convert them back if needed, using the following functions.
func (*QueryResult) MarshalBson ¶
func (queryResult *QueryResult) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes QueryResult.
func (*QueryResult) UnmarshalBson ¶
func (queryResult *QueryResult) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into QueryResult.
Click to show internal directories.
Click to hide internal directories.