Sha256: 818832226a9611c62adf2735263c9099c68063d7848754149b5e1220901e363e

Contents?: true

Size: 1.17 KB

Versions: 10

Compression:

Stored size: 1.17 KB

Contents

package org.embulk.input.oracle.getter;

import org.embulk.input.jdbc.AbstractJdbcInputPlugin;
import org.embulk.input.jdbc.JdbcColumn;
import org.embulk.input.jdbc.JdbcColumnOption;
import org.embulk.input.jdbc.JdbcInputConnection;
import org.embulk.input.jdbc.getter.ColumnGetter;
import org.embulk.input.jdbc.getter.ColumnGetterFactory;
import org.embulk.input.jdbc.getter.TimestampWithoutTimeZoneIncrementalHandler;
import org.embulk.spi.PageBuilder;
import org.joda.time.DateTimeZone;

public class OracleColumnGetterFactory extends ColumnGetterFactory
{

  public OracleColumnGetterFactory(PageBuilder to, DateTimeZone defaultTimeZone) {
    super(to, defaultTimeZone);
  }

  @Override
  public ColumnGetter newColumnGetter(JdbcInputConnection con, AbstractJdbcInputPlugin.PluginTask task, JdbcColumn column, JdbcColumnOption option)
  {

    ColumnGetter getter = super.newColumnGetter(con, task, column, option);

    switch (column.getTypeName()) {
      case "DATE":
        return new TimestampWithoutTimeZoneIncrementalHandler(getter);
      case "TIMESTAMP":
        return new TimestampWithoutTimeZoneIncrementalHandler(getter);
      default:
        return getter;
    }
  }

}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
embulk-input-oracle-0.10.1 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.10.0 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.9.3 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.9.2 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.9.1 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.9.0 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.8.6 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.8.5 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.8.4 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java
embulk-input-oracle-0.8.3 src/main/java/org/embulk/input/oracle/getter/OracleColumnGetterFactory.java