mysql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 9 Imported by: 0

README

MySQL Data source

Usage
go get github.com/SharkFourSix/dsync/sources/mysql
import "github.com/SharkFourSix/dsync/sources/mysql"

dsn := "username:password@tcp(localhost)/database?parseTime=true"

ds, err := mysql.New(dsn, &dsync.Config{ ... })
if err != nill {
    panic(err)
}

migrator.Migrate(ds)
Sql Driver

https://github.com/go-sql-driver

DSN Format Specifications

[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN]

NOTE: You must pass the ?parseTime=true option for the driver to properly parse TIMESTAMP to time.Time.

More information: https://github.com/go-sql-driver/mysql#dsn-data-source-name

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dsn string, cfg *dsync.Config) (dsync.DataSource, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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