mssql

package
v1.9.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnsWithDataTypes

func ColumnsWithDataTypes(columns model.TableSchema, prefix string) string

func Connect

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

func WithConfig added in v1.7.0

func WithConfig(h *MSSQL, config *config.Config)

Types

type Credentials added in v1.7.0

type Credentials struct {
	Host     string
	DBName   string
	User     string
	Password string
	Port     string
	SSLMode  string

	TunnelInfo *tunnelling.TunnelInfo
	// contains filtered or unexported fields
}

type MSSQL added in v1.7.0

type MSSQL struct {
	DB                          *sql.DB
	Namespace                   string
	ObjectStorage               string
	Warehouse                   model.Warehouse
	Uploader                    warehouseutils.Uploader
	ConnectTimeout              time.Duration
	EnableDeleteByJobs          bool
	Logger                      logger.Logger
	NumWorkersDownloadLoadFiles int
	LoadFileDownLoader          downloader.Downloader
}

func New added in v1.8.0

func New() *MSSQL

func (*MSSQL) AddColumns added in v1.7.0

func (ms *MSSQL) AddColumns(tableName string, columnsInfo []warehouseutils.ColumnInfo) (err error)

func (*MSSQL) AlterColumn added in v1.7.0

func (*MSSQL) AlterColumn(_, _, _ string) (model.AlterTableResponse, error)

func (*MSSQL) Cleanup added in v1.7.0

func (ms *MSSQL) Cleanup()

func (*MSSQL) Connect added in v1.7.0

func (ms *MSSQL) Connect(warehouse model.Warehouse) (client.Client, error)

func (*MSSQL) CrashRecover added in v1.7.0

func (ms *MSSQL) CrashRecover()

func (*MSSQL) CreateSchema added in v1.7.0

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

func (*MSSQL) CreateTable added in v1.7.0

func (ms *MSSQL) CreateTable(tableName string, columnMap model.TableSchema) (err error)

func (*MSSQL) DeleteBy added in v1.7.0

func (ms *MSSQL) DeleteBy(tableNames []string, params warehouseutils.DeleteByParams) (err error)

func (*MSSQL) DownloadIdentityRules added in v1.7.0

func (*MSSQL) DownloadIdentityRules(*misc.GZipWriter) (err error)

func (*MSSQL) DropTable added in v1.7.0

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

func (*MSSQL) ErrorMappings added in v1.7.0

func (*MSSQL) ErrorMappings() []model.JobError

func (*MSSQL) FetchSchema added in v1.7.0

func (ms *MSSQL) FetchSchema() (model.Schema, model.Schema, error)

FetchSchema queries mssql and returns the schema associated with provided namespace

func (*MSSQL) GetTotalCountInTable added in v1.7.0

func (ms *MSSQL) GetTotalCountInTable(ctx context.Context, tableName string) (int64, error)

func (*MSSQL) IsEmpty added in v1.7.0

func (*MSSQL) IsEmpty(_ model.Warehouse) (empty bool, err error)

func (*MSSQL) LoadIdentityMappingsTable added in v1.7.0

func (*MSSQL) LoadIdentityMappingsTable() (err error)

func (*MSSQL) LoadIdentityMergeRulesTable added in v1.7.0

func (*MSSQL) LoadIdentityMergeRulesTable() (err error)

func (*MSSQL) LoadTable added in v1.7.0

func (ms *MSSQL) LoadTable(ctx context.Context, tableName string) error

func (*MSSQL) LoadTestTable added in v1.7.0

func (ms *MSSQL) LoadTestTable(_, tableName string, payloadMap map[string]interface{}, _ string) (err error)

func (*MSSQL) LoadUserTables added in v1.7.0

func (ms *MSSQL) LoadUserTables(ctx context.Context) map[string]error

func (*MSSQL) SetConnectionTimeout added in v1.7.0

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

func (*MSSQL) Setup added in v1.7.0

func (ms *MSSQL) Setup(warehouse model.Warehouse, uploader warehouseutils.Uploader) (err error)

func (*MSSQL) TestConnection added in v1.7.0

func (ms *MSSQL) TestConnection(ctx context.Context, _ model.Warehouse) error

Jump to

Keyboard shortcuts

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