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.9 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.9-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.8 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.8-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.7 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.7-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.6 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.6-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.5 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.5-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.4 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.4-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.3 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.3-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.7.11 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.7.11-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.2 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.2-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.1 embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java
embulk-0.8.1-java embulk-core/src/main/java/org/embulk/spi/type/TimestampType.java