conn

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDBConnection

func GetDBConnection() db.SQL

GetDBConnection get the main database connection set by SetDBConnection.

func MigrateReset

func MigrateReset(url string) error

MigrateReset will do migration down.

func MigrateSync

func MigrateSync(url string) error

MigrateSync will sync all database structure from migration file to postgres. This uses lib/pq because sql-migrate only support sql.DB struct. Actually we can create struct that implements all method like sql.DB do, but it takes time.

func SetDBConnection

func SetDBConnection(conn db.SQL)

SetDBConnection will set the main database connection. This connection will be use as main DB.

Types

This section is empty.

Jump to

Keyboard shortcuts

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