All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.cypher.functions.date.duration.DurationInSecondsFunction Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.cypher.functions.date.duration;

import org.vertexium.cypher.CypherDuration;
import org.vertexium.cypher.VertexiumCypherQueryContext;

import java.time.temporal.ChronoUnit;

public class DurationInSecondsFunction extends DurationBetweenFunction {
    @Override
    protected Object executeFunction(VertexiumCypherQueryContext ctx, Object[] arguments) {
        CypherDuration duration = (CypherDuration) super.executeFunction(ctx, arguments);
        if (duration == null) {
            return null;
        }
        return duration.truncatedTo(ChronoUnit.SECONDS);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy