mssql

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnsWithDataTypes

func ColumnsWithDataTypes(columns map[string]string, prefix string) string

func Connect

func Connect(cred CredentialsT) (*sql.DB, error)

func Init

func Init()

Types

type CredentialsT

type CredentialsT struct {
	Host     string
	DBName   string
	User     string
	Password string
	Port     string
	SSLMode  string
	// contains filtered or unexported fields
}

type HandleT

type HandleT struct {
	Db             *sql.DB
	Namespace      string
	ObjectStorage  string
	Warehouse      warehouseutils.WarehouseT
	Uploader       warehouseutils.UploaderI
	ConnectTimeout time.Duration
}

func (*HandleT) AddColumn

func (ms *HandleT) AddColumn(tableName string, columnName string, columnType string) (err error)

func (*HandleT) AlterColumn

func (ms *HandleT) AlterColumn(tableName string, columnName string, columnType string) (err error)

func (*HandleT) Cleanup

func (ms *HandleT) Cleanup()

func (*HandleT) Connect

func (ms *HandleT) Connect(warehouse warehouseutils.WarehouseT) (client.Client, error)

func (*HandleT) CrashRecover

func (ms *HandleT) CrashRecover(warehouse warehouseutils.WarehouseT) (err error)

func (*HandleT) CreateSchema

func (ms *HandleT) CreateSchema() (err error)

func (*HandleT) CreateTable

func (ms *HandleT) CreateTable(tableName string, columnMap map[string]string) (err error)

func (*HandleT) DownloadIdentityRules

func (ms *HandleT) DownloadIdentityRules(*misc.GZipWriter) (err error)

func (*HandleT) DownloadLoadFiles

func (ms *HandleT) DownloadLoadFiles(tableName string) ([]string, error)

func (*HandleT) DropTable

func (ms *HandleT) DropTable(tableName string) (err error)

func (*HandleT) FetchSchema

func (ms *HandleT) FetchSchema(warehouse warehouseutils.WarehouseT) (schema warehouseutils.SchemaT, err error)

FetchSchema queries mssql and returns the schema associated with provided namespace

func (*HandleT) GetTotalCountInTable

func (ms *HandleT) GetTotalCountInTable(tableName string) (total int64, err error)

func (*HandleT) IsEmpty

func (bq *HandleT) IsEmpty(warehouse warehouseutils.WarehouseT) (empty bool, err error)

func (*HandleT) LoadIdentityMappingsTable

func (ms *HandleT) LoadIdentityMappingsTable() (err error)

func (*HandleT) LoadIdentityMergeRulesTable

func (ms *HandleT) LoadIdentityMergeRulesTable() (err error)

func (*HandleT) LoadTable

func (ms *HandleT) LoadTable(tableName string) error

func (*HandleT) LoadTestTable

func (ms *HandleT) LoadTestTable(location string, tableName string, payloadMap map[string]interface{}, format string) (err error)

func (*HandleT) LoadUserTables

func (ms *HandleT) LoadUserTables() map[string]error

func (*HandleT) SetConnectionTimeout

func (ms *HandleT) SetConnectionTimeout(timeout time.Duration)

func (*HandleT) Setup

func (ms *HandleT) Setup(warehouse warehouseutils.WarehouseT, uploader warehouseutils.UploaderI) (err error)

func (*HandleT) TestConnection

func (ms *HandleT) TestConnection(warehouse warehouseutils.WarehouseT) (err error)

Jump to

Keyboard shortcuts

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