Sha256: 549641af72d1ce787cd2b2b6b24e135f2486f7cf2f6a33b18b64750d24660aac

Contents?: true

Size: 1006 Bytes

Versions: 2

Compression:

Stored size: 1006 Bytes

Contents

package org.embulk.output.oracle.setter;

import java.sql.Types;

import org.embulk.output.jdbc.BatchInsert;
import org.embulk.output.jdbc.JdbcColumn;
import org.embulk.output.jdbc.setter.ColumnSetter;
import org.embulk.output.jdbc.setter.ColumnSetterFactory;
import org.embulk.output.jdbc.setter.StringColumnSetter;
import org.embulk.spi.PageReader;
import org.embulk.spi.time.TimestampFormatter;

public class OracleColumnSetterFactory extends ColumnSetterFactory
{
    public OracleColumnSetterFactory(BatchInsert batch, PageReader pageReader,
            TimestampFormatter timestampFormatter)
    {
        super(batch, pageReader, timestampFormatter);
    }
    
    @Override
    public ColumnSetter newColumnSetter(JdbcColumn column)
    {
        switch (column.getSqlType()) {
            case Types.DECIMAL:
                return new StringColumnSetter(batch, pageReader, column, timestampFormatter);
            default:
                return super.newColumnSetter(column);
        }
    }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
embulk-output-oracle-0.2.3 src/main/java/org/embulk/output/oracle/setter/OracleColumnSetterFactory.java
embulk-output-oracle-0.2.2 src/main/java/org/embulk/output/oracle/setter/OracleColumnSetterFactory.java