sqlmanager_mssql

package
v0.4.62 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMssqlDeleteStatement added in v0.4.60

func BuildMssqlDeleteStatement(
	schema, table string,
) string

func BuildMssqlIdentityColumnResetStatement added in v0.4.60

func BuildMssqlIdentityColumnResetStatement(
	schema, table, identityGeneration string,
) *string

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(querier mssql_queries.Querier, db mysql_queries.DBTX, closer func()) *Manager

func (*Manager) BatchExec

func (m *Manager) BatchExec(ctx context.Context, batchSize int, statements []string, opts *sqlmanager_shared.BatchExecOpts) error

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) Exec

func (m *Manager) Exec(ctx context.Context, statement string) error

func (*Manager) GetCreateTableStatement

func (m *Manager) GetCreateTableStatement(ctx context.Context, schema, table string) (string, error)

func (*Manager) GetDatabaseSchema

func (m *Manager) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)

func (*Manager) GetRolePermissionsMap

func (m *Manager) GetRolePermissionsMap(ctx context.Context) (map[string][]string, error)

func (*Manager) GetSchemaColumnMap

func (m *Manager) GetSchemaColumnMap(ctx context.Context) (map[string]map[string]*sqlmanager_shared.ColumnInfo, error)

func (*Manager) GetSchemaInitStatements

func (m *Manager) GetSchemaInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.InitSchemaStatements, error)

func (*Manager) GetSchemaTableTriggers

func (m *Manager) GetSchemaTableTriggers(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableTrigger, error)

func (*Manager) GetTableConstraintsBySchema

func (m *Manager) GetTableConstraintsBySchema(ctx context.Context, schemas []string) (*sqlmanager_shared.TableConstraints, error)

func (*Manager) GetTableInitStatements

func (m *Manager) GetTableInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableInitStatement, error)

func (*Manager) GetTableRowCount

func (m *Manager) GetTableRowCount(
	ctx context.Context,
	schema, table string,
	whereClause *string,
) (int64, error)

Jump to

Keyboard shortcuts

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