mysql

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

/ MySQL InnoDB Storage ENGINE Client

Index

Constants

This section is empty.

Variables

View Source
var (
	INT_TYPES      = []string{"tinyint", "smallint", "mediumint", "int", "integer", "bigint", "float", "double", "real", "decimal", "numeric", "bit"}
	DATETIME_TYPES = []string{"year", "date", "time", "datetime", "timestamp"}
	STRING_TYPES   = []string{"char", "binary", "varchar", "varbinary", "tinyblob", "text", "tinytext", "mediumblob", "mediumtext", "longblob", "longtext", "enum", "set"}
)

MySQLのカラム型種別(大きく数値型、日時型、文字列型に分ける)

Functions

This section is empty.

Types

type Config

type Config struct {
	MySQL MySQLConfig
}

func GetMySQLConfig

func GetMySQLConfig() (config Config)

type MySQLClient

type MySQLClient struct {
	Client *sql.DB
	DbName string
}

func NewMySQLClient

func NewMySQLClient(params MySQLDSNParams) (*MySQLClient, error)

func (*MySQLClient) GetTables

func (client *MySQLClient) GetTables() ([]MySQLTable, error)

type MySQLConfig

type MySQLConfig struct {
	Username string
	Password string
	Hostname string
	Port     int
	DbName   string
	UnixSock string
}

type MySQLDSNParams

type MySQLDSNParams struct {
	Username string
	Password string
	Hostname string
	Port     int
	UnixSock string
	DbName   string
}

type MySQLIndex

type MySQLIndex struct {
	IndexName  string
	ColumnName string
	DataType   string
}

type MySQLTable

type MySQLTable struct {
	Name    string
	Indexes []MySQLIndex
}

Jump to

Keyboard shortcuts

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