mssql

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 9 Imported by: 0

README

Mssql

Work in progress, not tested, meant to work with Mssql >= 2016

Target support:

  • All operations inherited from rdbms module (see ../rdbms/README.md for details)

Table types are not yet implemented

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelperSplitSchemaName

func HelperSplitSchemaName(name string) (string, string, error)

split {schema}.{name} sql name into 2 parts

func Merge

func Merge(ctx *rdbms.StmtCtx, ts *rdbms.MergeTableCtx) (string, error)

func RemoteGetAllCheck

func RemoteGetAllCheck(db *sql.DB, tableName string) ([]rdbms.Check, error)

func RemoteGetAllColumn

func RemoteGetAllColumn(db *sql.DB, tableName string) ([]rdbms.Column, error)

func RemoteGetAllFK

func RemoteGetAllFK(db *sql.DB, tableName string) ([]rdbms.ForeignKey, error)

func RemoteGetAllIx

func RemoteGetAllIx(db *sql.DB, tableName string) ([]rdbms.Index, error)

func RemoteGetAllPK

func RemoteGetAllPK(db *sql.DB, tableName string) (*rdbms.PrimaryKey, error)

func RemoteGetAllUnique

func RemoteGetAllUnique(db *sql.DB, tableName string) ([]rdbms.Unique, error)

func RemoteGetMatchedTables

func RemoteGetMatchedTables(db *sql.DB, userTables []rdbms.Table) ([]rdbms.Table, error)

func RemoteGetTableDef

func RemoteGetTableDef(db *sql.DB, tableName string) (*rdbms.Table, error)

func StmtAddColumn

func StmtAddColumn(tableName string, c *rdbms.Column) string

func StmtAlterColumn

func StmtAlterColumn(tableName string, old, new *rdbms.Column) string

func StmtColumnType

func StmtColumnType(column *rdbms.Column) string

func StmtCreateIx

func StmtCreateIx(tableName string, ix *rdbms.Index) string

func StmtCreateTable

func StmtCreateTable(t *rdbms.Table) string

func StmtDefColumn

func StmtDefColumn(column *rdbms.Column) string

func StmtDropColumn

func StmtDropColumn(tablename string, c *rdbms.Column) string

func StmtDropIx

func StmtDropIx(tableName string, i *rdbms.Index) string

func StmtNew

func StmtNew() *rdbms.StmtCtx

func TargetCtxNew

func TargetCtxNew() *target.Ctx

func TargetGetCS

func TargetGetCS(target *target.Target) (string, error)

func TargetGetDB

func TargetGetDB(target *target.Target) (interface{}, error)

func TargetGetMergeScript

func TargetGetMergeScript(
	dbctx interface{}, ectx *target.Target, argv []string,
) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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