View Revisions: Issue #6751

Summary 0006751: Consolidate detection of Binary Encoding & Decoding for table in batch
Revision 2025-03-12 15:36 by pbelov
Description Consolidate detection of Binary Encoding & Decoding for table in batch
Currently multiple classes dialect-specific database Writer classes detect batch decoding requirements separately, even though criteria are shared.
Revision 2025-06-02 13:13 by pbelov
Description Consolidate detection of Binary Encoding & Decoding for table in batch
Currently multiple classes dialect-specific database Writer classes detect batch decoding requirements separately, even though criteria are shared.

Example - PostgresBulkDatabaseWriter class has this code repeated (same code as for other Writer classes):
   protected boolean isBinaryConversionNeededForBatch(Batch batch) {
        if (batch.getBinaryEncoding() != BinaryEncoding.NONE && targetTable != null) {
            for (Column column : targetTable.getColumns()) {
                if (column.isOfBinaryType()) {
                    return true;
                }
            }
        }
        return false;
    }