createOrReplaceFkCompensationTrigger method

List<String> createOrReplaceFkCompensationTrigger(
  1. String opType,
  2. QualifiedTablename table,
  3. String childKey,
  4. QualifiedTablename fkTable,
  5. String joinedFkPKs,
  6. ForeignKey foreignKey,
)

Implementation

List<String> createOrReplaceFkCompensationTrigger(
  String opType,
  QualifiedTablename table,
  String childKey,
  QualifiedTablename fkTable,
  String joinedFkPKs,
  ForeignKey foreignKey,
) {
  return [
    dropTriggerIfExists(
      'compensation_${opType.toLowerCase()}_${table.namespace}_${table.tablename}_${childKey}_into_oplog',
      table,
    ),
    ...createFkCompensationTrigger(
      opType,
      table,
      childKey,
      fkTable,
      joinedFkPKs,
      foreignKey,
    ),
  ];
}