(ctx context.Context, tableName string, statements []string)
| 105 | } |
| 106 | |
| 107 | func (c *Client) execStatements(ctx context.Context, tableName string, statements []string) error { |
| 108 | if len(statements) == 0 { |
| 109 | return nil |
| 110 | } |
| 111 | |
| 112 | return c.doInTx(ctx, func(tx *sql.Tx) error { |
| 113 | query := strings.Join(statements, "\n") |
| 114 | c.logger.Debug().Str("table", tableName).Str("query", query).Msg("exec migration statement") |
| 115 | _, err := c.db.ExecContext(ctx, query) |
| 116 | return err |
| 117 | }) |
| 118 | } |
no test coverage detected