mysql

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package mysql wraps mysql driver as an adapter for grimoire.

Usage:

// open mysql connection.
adapter, err := mysql.Open("root@(127.0.0.1:3306)/grimoire_test?charset=utf8&parseTime=True&loc=Local")
if err != nil {
	panic(err)
}
defer adapter.Close()

// initialize grimoire's repo.
repo := grimoire.New(adapter)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	*sql.Adapter
}

Adapter definition for mysql database.

func Open

func Open(dsn string) (*Adapter, error)

Open mysql connection using dsn.

Jump to

Keyboard shortcuts

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