MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / execStatements

Method execStatements

plugins/destination/mssql/client/migrate.go:107–118  ·  view source on GitHub ↗
(ctx context.Context, tableName string, statements []string)

Source from the content-addressed store, hash-verified

105}
106
107func (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}

Callers 1

autoMigrateTableMethod · 0.95

Calls 1

doInTxMethod · 0.95

Tested by

no test coverage detected