APISonar


org.elasticsearch.xpack.sql.type.DataType.TIME

> org > elasticsearch > xpack > sql > type > DataType > TIME
org APIs elasticsearch APIs xpack APIs sql APIs type APIs DataType APIs TIME APIs

Example 1
public Literal visitTimeEscapedLiteral(TimeEscapedLiteralContext ctx) {
        String string = string(ctx.string());
        Source source = source(ctx);

        // parse HH:mm:ss
        try {
            return new Literal(source, asTimeOnly(string), DataType.TIME);
        } catch (DateTimeParseException ex) {
            throw new ParsingException(source, "Invalid time received; {}", ex.getMessage());
        }
    }
Example 2
public CurrentTime(Source source, Expression precision, Configuration configuration) {
        super(source, configuration, nanoPrecision(configuration.now().toOffsetDateTime().toOffsetTime(), precision),
            DataType.TIME);
        this.precision = precision;
    }
Example 3
public void testTimeLiteral() {
        Literal l = timeLiteral("12:23:56");
        assertThat(l.dataType(), is(DataType.TIME));
    }