adapter

package
v0.0.0-...-e991ac3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Overview

This package has database adapter layer. Never deal with DDL construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpDDLs

func DumpDDLs(d Database) (string, error)

func RunDDLs

func RunDDLs(d Database, ddls []string, skipDrop bool) error

Types

type Config

type Config struct {
	DbName   string
	User     string
	Password string
	Host     string
	Port     int
	Socket   string
}

type Database

type Database interface {
	TableNames() ([]string, error)
	DumpTableDDL(table string) (string, error)
	Views() ([]string, error)
	DB() *sql.DB
	Close() error
}

Abstraction layer for multiple kinds of databases

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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