connectors

package
v1.8.48 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IConnector

type IConnector interface {
	Connect() (server *schema.Server, e error)
	FetchDatabases(server *schema.Server) (databases map[string]*schema.Database, e error)
	// FetchEnums(server *Server) (enums map[string][]map[string]interface{})
	FetchEnum(server *schema.Server, tableName string) []map[string]interface{}
	UseDatabase(server *schema.Server, databaseName string) (e error)
	FetchDatabase(server *schema.Server, databaseName string) (schema *schema.Database, e error)
	FetchTableColumns(server *schema.Server, databaseName string, tableName string) (columns map[string]*schema.Column, e error)
	CreateChangeSQL(localSchema *schema.Schema, remoteSchema *schema.Schema, databaseName string) (s *schema.SchemaComparison)
}

IConnector defines the shape of a connector to a database

func DBConnectorFactory

func DBConnectorFactory(config *lib.ConfigDatabase) (connector IConnector, e error)

DBConnectorFactory is a factory method for database connections

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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