mysql

package
v0.0.0-...-60156bf Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateType

type DateType string

DateType MySQL data type

const (
	Tinyint   DateType = "tinyint"
	SmallInt  DateType = "smallint"
	MediumInt DateType = "mediumint"
	Int       DateType = "int"
	Integer   DateType = "integer"
	BigInt    DateType = "bigint"

	Float   DateType = "float"
	Double  DateType = "double"
	Decimal DateType = "decimal"

	Date      DateType = "date"
	Time      DateType = "time"
	Year      DateType = "year"
	Datetime  DateType = "datetime"
	Timestamp DateType = "timestamp"

	Char       DateType = "char"
	Varchar    DateType = "varchar"
	TinyText   DateType = "tinytext"
	Text       DateType = "text"
	MediumText DateType = "mediumtext"
	LongText   DateType = "longtext"

	TinyBlob   DateType = "tinyblob"
	Blob       DateType = "blob"
	MediumBlob DateType = "mediumblob"
	LongBlob   DateType = "longblob"
)

func (DateType) String

func (t DateType) String() string

type Field

type Field struct {
	Name      string
	Type      DateType
	Converter string
}

Field for database table field schema

type MySQL

type MySQL struct {
	Driver    database.Driver
	TableName string
	Mapping   database.Mapping
	// contains filtered or unexported fields
}

MySQL database transfer

func NewMySQL

func NewMySQL(args *database.Options) (*MySQL, error)

NewMySQL return MySQL transfer

func (*MySQL) MappingFields

func (mysql *MySQL) MappingFields() []Field

MappingFields return map[source]Field

func (*MySQL) Reader

func (mysql *MySQL) Reader(query database.Query) (packet database.Packet, err error)

Reader database

func (*MySQL) TableSchema

func (mysql *MySQL) TableSchema() error

TableSchema return table schema

func (*MySQL) Writer

func (mysql *MySQL) Writer(packet database.Packet) error

Writer data

Jump to

Keyboard shortcuts

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