Sha256: c6e7739db7b8ee9e7637b7b3d1b446911d4236498d319dcf0fd296bbef99fc6c

Contents?: true

Size: 892 Bytes

Versions: 1

Compression:

Stored size: 892 Bytes

Contents

package org.embulk.filter.add_time.reader;

import org.embulk.filter.add_time.converter.ValueConverter;
import org.embulk.spi.Column;
import org.embulk.spi.PageBuilder;
import org.embulk.spi.PageReader;
import org.msgpack.value.Value;

public class JsonColumnReader
        extends AbstractColumnReader<JsonColumnReader>
{
    protected Value value;

    public JsonColumnReader(ValueConverter valueConverter)
    {
        super(valueConverter);
    }

    @Override
    public void readNonNullValue(Column column, PageReader pageReader)
    {
        value = pageReader.getJson(column);
    }

    @Override
    public void convertNonNullValue(Column column, PageBuilder pageBuilder)
    {
        valueConverter.convertValue(column, value, pageBuilder);
    }

    @Override
    public void copyValueTo(JsonColumnReader columnReader)
    {
        columnReader.value = this.value;
    }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
embulk-filter-add_time-0.2.0 src/main/java/org/embulk/filter/add_time/reader/JsonColumnReader.java