Sha256: 95673ac386f08b4daa5b1ce5eb6e9838390e36be1740476c34e27f2c071c55ea
Contents?: true
Size: 1.38 KB
Versions: 78
Compression:
Stored size: 1.38 KB
Contents
package org.embulk.spi.util.dynamic; import org.embulk.spi.PageBuilder; import org.embulk.spi.Column; import org.embulk.spi.time.Timestamp; import org.embulk.spi.time.TimestampFormatter; import org.msgpack.value.Value; public class StringColumnSetter extends AbstractDynamicColumnSetter { private final TimestampFormatter timestampFormatter; public StringColumnSetter(PageBuilder pageBuilder, Column column, DefaultValueSetter defaultValue, TimestampFormatter timestampFormatter) { super(pageBuilder, column, defaultValue); this.timestampFormatter = timestampFormatter; } @Override public void setNull() { pageBuilder.setNull(column); } @Override public void set(boolean v) { pageBuilder.setString(column, Boolean.toString(v)); } @Override public void set(long v) { pageBuilder.setString(column, Long.toString(v)); } @Override public void set(double v) { pageBuilder.setString(column, Double.toString(v)); } @Override public void set(String v) { pageBuilder.setString(column, v); } @Override public void set(Timestamp v) { pageBuilder.setString(column, timestampFormatter.format(v)); } @Override public void set(Value v) { pageBuilder.setString(column, v.toJson()); } }
Version data entries
78 entries across 78 versions & 1 rubygems