Rules¶
DataSync has a concept called Rule which represents an operation to perform in the replication process.
Currently, there are two types of them:
- Export Rules: act on the export replication process.
- Import Rules: act on the import replication process.
Modifiers¶
When we try to create an import or export rule, we need to have something that allow us to modify the sql statement that will be executed to import or export data. For that reason, we created the modifiers.
Modifiers are interfaces that allow us to add information to the import/export rule.
C# | |
---|---|
Every modifier has an extension method associated that allow us to modify the statement that will be processed for the rule.
C# | |
---|---|
Since rules implement modifier's interfaces, we can use this external actions in the rule's logic, for example:
Modifiers Types¶
Filter Expression¶
Changes the statement's condition.
Stamp¶
Changes the values of certain columns of the rows affected by the execution of the rule.
For Example: after exporting all the rows, change their ExportMarker column's value to 1.