Documentation ¶
Index ¶
- func BuildMssqlDeleteStatement(schema, table string) string
- func BuildMssqlIdentityColumnResetCurrent(schema, table string) string
- func BuildMssqlIdentityColumnResetStatement(schema, table, identityGeneration string) string
- func BuildMssqlSetIdentityInsertStatement(schema, table string, enable bool) string
- type Manager
- func (m *Manager) BatchExec(ctx context.Context, batchSize int, statements []string, ...) error
- func (m *Manager) Close()
- func (m *Manager) Exec(ctx context.Context, statement string) error
- func (m *Manager) GetCreateTableStatement(ctx context.Context, schema, table string) (string, error)
- func (m *Manager) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)
- func (m *Manager) GetRolePermissionsMap(ctx context.Context) (map[string][]string, error)
- func (m *Manager) GetSchemaColumnMap(ctx context.Context) (map[string]map[string]*sqlmanager_shared.ColumnInfo, error)
- func (m *Manager) GetSchemaInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.InitSchemaStatements, error)
- func (m *Manager) GetSchemaTableDataTypes(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) (*sqlmanager_shared.SchemaTableDataTypeResponse, error)
- func (m *Manager) GetSchemaTableTriggers(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableTrigger, error)
- func (m *Manager) GetTableConstraintsBySchema(ctx context.Context, schemas []string) (*sqlmanager_shared.TableConstraints, error)
- func (m *Manager) GetTableInitStatements(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) ([]*sqlmanager_shared.TableInitStatement, error)
- func (m *Manager) GetTableRowCount(ctx context.Context, schema, table string, whereClause *string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMssqlDeleteStatement ¶ added in v0.4.60
func BuildMssqlIdentityColumnResetCurrent ¶ added in v0.4.66
If the current identity value for a table is less than the maximum identity value stored in the identity column It is reset using the maximum value in the identity column.
func BuildMssqlIdentityColumnResetStatement ¶ added in v0.4.60
Resets current identity value back to the initial count
func BuildMssqlSetIdentityInsertStatement ¶ added in v0.4.66
Allows explicit values to be inserted into the identity column of a table.
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) GetCreateTableStatement ¶
func (*Manager) GetDatabaseSchema ¶
func (m *Manager) GetDatabaseSchema(ctx context.Context) ([]*sqlmanager_shared.DatabaseSchemaRow, error)
func (*Manager) GetRolePermissionsMap ¶
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) GetSchemaTableDataTypes ¶
func (m *Manager) GetSchemaTableDataTypes(ctx context.Context, tables []*sqlmanager_shared.SchemaTable) (*sqlmanager_shared.SchemaTableDataTypeResponse, 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)
Click to show internal directories.
Click to hide internal directories.