createOrReplaceOplogTrigger method
List<String>
createOrReplaceOplogTrigger(
- SqlOpType opType,
- QualifiedTablename table,
- String newPKs,
- String newRows,
- String oldRows,
Implementation
List<String> createOrReplaceOplogTrigger(
SqlOpType opType,
QualifiedTablename table,
String newPKs,
String newRows,
String oldRows,
) {
final namespace = table.namespace;
final tableName = table.tablename;
return [
dropTriggerIfExists(
'${opType.text.toLowerCase()}_${namespace}_${tableName}_into_oplog',
table,
),
...createOplogTrigger(
opType,
table,
newPKs,
newRows,
oldRows,
),
];
}