mysql

package
v0.0.0-...-ebdf1d9 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: MIT Imports: 4 Imported by: 18

Documentation

Overview

Package mysql provides a wrapper around the sqlx package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Username  string    `json:"Username"`
	Password  string    `json:"Password"`
	Database  string    `json:"Database"`
	Charset   string    `json:"Charset"`
	Collation string    `json:"Collation"`
	Hostname  string    `json:"Hostname"`
	Port      int       `json:"Port"`
	Parameter string    `json:"Parameter"`
	Migration Migration `json:"Migration"`
}

Info holds the details for the MySQL connection.

func (Info) Connect

func (c Info) Connect(specificDatabase bool) (*sqlx.DB, error)

Connect to the database.

func (Info) Create

func (c Info) Create(sql *sqlx.DB) error

Create a new database.

func (Info) Drop

func (c Info) Drop(sql *sqlx.DB) error

Drop a database.

type Migration

type Migration struct {
	Table     string
	Folder    string
	Extension string
}

Migration holds the MySQL migration information.

Jump to

Keyboard shortcuts

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