Sha256: ae0c257eb787d037aa07a634ae4b5ffc0cff8f47e112af6fa5fc609641c452a5

Contents?: true

Size: 867 Bytes

Versions: 118

Compression:

Stored size: 867 Bytes

Contents

package org.embulk.spi.type;

import org.embulk.spi.time.Timestamp;

public class TimestampType
        extends AbstractType
{
    static final TimestampType TIMESTAMP = new TimestampType();

    private static final String DEFAULT_FORMAT = "%Y-%m-%d %H:%M:%S.%6N %z";

    private final String format;

    private TimestampType()
    {
        this(null);
    }

    private TimestampType(String format)
    {
        super("timestamp", Timestamp.class, 12);  // long msec + int nsec
        this.format = format;
    }

    @Deprecated
    public TimestampType withFormat(String format)
    {
        // TODO is this correct design...?
        return new TimestampType(format);
    }

    @Deprecated
    public String getFormat()
    {
        if (format == null) {
            return DEFAULT_FORMAT;
        } else {
            return format;
        }
    }
}

Version data entries

118 entries across 118 versions & 1 rubygems

Version Path
embulk-0.8.39 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.39-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.38 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.38-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.37 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.37-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.36 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.36-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.35 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.35-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.34 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.34-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.33 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.33-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.32 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.32-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.31 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.31-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.30 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.30-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java