Class TimeFcts
java.lang.Object
org.apache.cassandra.cql3.functions.TimeFcts
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFunction that rounds a date down to the closest multiple of a duration.static final classFunction that rounds a timestamp down to the closest multiple of a duration.static final classFunction that rounds a timeUUID down to the closest multiple of a duration.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NativeScalarFunctionFunction that rounds a time down to the closest multiple of a duration.static org.slf4j.Loggerstatic final NativeFunctionstatic final NativeFunction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFunctionsTo(NativeFunctions functions) static NativeScalarFunctiontoDate(TemporalType<?> type) Creates a function that converts a value of the specified type into aDATE.static NativeScalarFunctiontoTimestamp(TemporalType<?> type) Creates a function that converts a value of the specified type into aTIMESTAMP.static NativeScalarFunctiontoUnixTimestamp(TemporalType<?> type) Creates a function that converts a value of the specified type into a UNIX timestamp.
-
Field Details
-
logger
public static org.slf4j.Logger logger -
minTimeuuidFct
-
maxTimeuuidFct
-
floorTime
Function that rounds a time down to the closest multiple of a duration.
-
-
Constructor Details
-
TimeFcts
public TimeFcts()
-
-
Method Details
-
addFunctionsTo
-
toDate
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
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
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.
-