Sha256: f2b0f23571ca4b582abc9de970f880ec7ccb51d9d373168f538c9000abddc15c

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

package org.embulk.input.jdbc.getter;

import org.embulk.spi.Column;
import org.embulk.spi.PageBuilder;
import org.embulk.spi.time.Timestamp;
import org.embulk.spi.time.TimestampFormatter;
import org.embulk.spi.type.Type;

public abstract class AbstractTimestampColumnGetter
        extends AbstractColumnGetter
{
    protected final TimestampFormatter timestampFormatter;
    protected Timestamp value;

    public AbstractTimestampColumnGetter(PageBuilder to, Type toType, TimestampFormatter timestampFormatter)
    {
        super(to, toType);

        this.timestampFormatter = timestampFormatter;
    }

    @Override
    public void stringColumn(Column column)
    {
        to.setString(column, timestampFormatter.format(value));
    }

    @Override
    public void jsonColumn(Column column) {
        throw new UnsupportedOperationException("This plugin doesn't support json type. Please try to upgrade version of the plugin using 'embulk gem update' command. If the latest version still doesn't support json type, please contact plugin developers, or change configuration of input plugin not to use json type.");
    }

    @Override
    public void timestampColumn(Column column)
    {
        to.setTimestamp(column, value);
    }
}

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
embulk-input-jdbc-0.10.0 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.9.3 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.9.2 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-athena-0.1.0 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.9.1 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.9.0 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.8.6 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.8.5 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.8.4 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.8.3 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.8.2 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java
embulk-input-jdbc-0.8.1 src/main/java/org/embulk/input/jdbc/getter/AbstractTimestampColumnGetter.java