Gaffer
Gaffer copied to clipboard
Refactor ToOpenCypherCsv and ToCsv
This will change the way how the current ExportCSV PR works gh-2675. In place of a a new operation handler for each new CSV format, the new method will instead the utilise the current operation ToCsv and its handler and will require an additional helper object that will determine the CSV format.
As explained, https://github.com/gchq/Gaffer/pull/2704 added an Operation called ToOpenCypherCsv. This isn't a very extensible design for adding new Csv formats though, so instead ToCsv should be refactored. Ideally, it should keep its current functionaility of user defined fields as well as supporting pre-exiswting formats. These formats could be implemented as generators.
An example OperationChain would look like:
GetElements -> ToCsv(Neo4jFormat) -> ExportToLocalFile
Fixed by https://github.com/gchq/Gaffer/pull/2751