MCPcopy Create free account
hub / github.com/Shopify/ghostferry / AsSQLString

Method AsSQLString

dml_events.go:266–275  ·  view source on GitHub ↗
(schemaName, tableName string)

Source from the content-addressed store, hash-verified

264}
265
266func (e *BinlogDeleteEvent) AsSQLString(schemaName, tableName string) (string, error) {
267 if err := verifyValuesHasTheSameLengthAsColumns(e.table, e.oldValues); err != nil {
268 return "", err
269 }
270
271 query := "DELETE FROM " + QuotedTableNameFromString(schemaName, tableName) +
272 " WHERE " + buildStringMapForWhere(e.table.Columns, e.oldValues)
273
274 return query, nil
275}
276
277func (e *BinlogDeleteEvent) PaginationKey() (string, error) {
278 return paginationKeyFromEventData(e.table, e.oldValues)

Callers

nothing calls this directly

Tested by

no test coverage detected