connectors

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 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.Schema, 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)
	FetchDatabaseTables(server *schema.Server, databaseName string) (tables map[string]*schema.Table, e error)
	FetchTableColumns(server *schema.Server, databaseName string, tableName string) (columns map[string]*schema.Column, e error)
	CreateChangeSQL(localSchema *schema.Schema, remoteSchema *schema.Schema) (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