// ExecSQLTx executes a SQL code
ExecSQLTx executes a SQL code
// ExecSQLTx executes a SQL code
func (r MigrationRepository) ExecSQLTx(ctx context.Context, t migration.Transaction, sql string) error {
	tx, ok := t.(*sqlx.Tx)
	if !ok {
		return errors.New("can not assert param t migration.Transaction to *sqlx.Tx")
	}
	_, err := tx.ExecContext(ctx, sql)
	if err != nil {
		return errors.Wrapf(apperror.ErrUsersSQL, "MigrationRepository.ExecSQL error: %v", err)
	}
	return nil
}
func ( r MigrationRepository ) ExecSQLTx ( ctx context . Context , t migration . Transaction , sql string ) error { tx , ok := t . ( * sqlx . Tx ) if ! ok { return errors . New ( " " ) } _ , err := tx . ExecContext ( ctx , sql ) if err != nil { return errors . Wrapf ( apperror . ErrUsersSQL , " " , err ) } return nil }
ExecSQLTx executes a SQL code
ExecSQLTx executes a SQL code