Class TimeFcts
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.TimeFcts
-
public abstract class TimeFcts extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TimeFcts.FloorDateFunction
Function that rounds a date down to the closest multiple of a duration.static class
TimeFcts.FloorTimestampFunction
Function that rounds a timestamp down to the closest multiple of a duration.static class
TimeFcts.FloorTimeUuidFunction
Function that rounds a timeUUID down to the closest multiple of a duration.static class
TimeFcts.TemporalConversionFunction
-
Field Summary
Fields Modifier and Type Field Description static NativeScalarFunction
floorTime
Function that rounds a time down to the closest multiple of a duration.static org.slf4j.Logger
logger
static NativeFunction
maxTimeuuidFct
static NativeFunction
minTimeuuidFct
-
Constructor Summary
Constructors Constructor Description TimeFcts()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addFunctionsTo(NativeFunctions functions)
static NativeScalarFunction
toDate(TemporalType<?> type)
Creates a function that converts a value of the specified type into aDATE
.static NativeScalarFunction
toTimestamp(TemporalType<?> type)
Creates a function that converts a value of the specified type into aTIMESTAMP
.static NativeScalarFunction
toUnixTimestamp(TemporalType<?> type)
Creates a function that converts a value of the specified type into a UNIX timestamp.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
minTimeuuidFct
public static final NativeFunction minTimeuuidFct
-
maxTimeuuidFct
public static final NativeFunction maxTimeuuidFct
-
floorTime
public static final NativeScalarFunction floorTime
Function that rounds a time down to the closest multiple of a duration.
-
-
Method Detail
-
addFunctionsTo
public static void addFunctionsTo(NativeFunctions functions)
-
toDate
public static NativeScalarFunction toDate(TemporalType<?> type)
Creates a function that converts a value of the specified type into aDATE
.- Parameters:
type
- the temporal type- Returns:
- a function that convert a value of the specified type into a
DATE
.
-
toTimestamp
public static NativeScalarFunction toTimestamp(TemporalType<?> type)
Creates a function that converts a value of the specified type into aTIMESTAMP
.- Parameters:
type
- the temporal type- Returns:
- a function that convert a value of the specified type into a
TIMESTAMP
.
-
toUnixTimestamp
public static NativeScalarFunction toUnixTimestamp(TemporalType<?> type)
Creates a function that converts a value of the specified type into a UNIX timestamp.- Parameters:
type
- the temporal type- Returns:
- a function that convert a value of the specified type into a UNIX timestamp.
-
-