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 classTimeFcts.FloorDateFunctionFunction that rounds a date down to the closest multiple of a duration.static classTimeFcts.FloorTimestampFunctionFunction that rounds a timestamp down to the closest multiple of a duration.static classTimeFcts.FloorTimeUuidFunctionFunction that rounds a timeUUID down to the closest multiple of a duration.
-
Field Summary
Fields Modifier and Type Field Description static NativeScalarFunctiondateOfFctDeprecated.Replaced by thetoTimestamp(org.apache.cassandra.db.marshal.TemporalType<?>)functionstatic NativeScalarFunctionfloorTimeFunction that rounds a time down to the closest multiple of a duration.static org.slf4j.Loggerloggerstatic FunctionmaxTimeuuidFctstatic FunctionminTimeuuidFctstatic NativeScalarFunctionunixTimestampOfFctDeprecated.Replaced by thetoUnixTimestamp(org.apache.cassandra.db.marshal.TemporalType<?>)function
-
Constructor Summary
Constructors Constructor Description TimeFcts()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Collection<Function>all()static Functionnow(java.lang.String name, TemporalType<?> type)static NativeScalarFunctiontoDate(TemporalType<?> type)Creates a function that convert a value of the specified type into aDATE.static NativeScalarFunctiontoTimestamp(TemporalType<?> type)Creates a function that convert a value of the specified type into aTIMESTAMP.static NativeScalarFunctiontoUnixTimestamp(TemporalType<?> type)Creates a function that convert a value of the specified type into an UNIX timestamp.
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
minTimeuuidFct
public static final Function minTimeuuidFct
-
maxTimeuuidFct
public static final Function maxTimeuuidFct
-
dateOfFct
public static final NativeScalarFunction dateOfFct
Deprecated.Replaced by thetoTimestamp(org.apache.cassandra.db.marshal.TemporalType<?>)functionFunction that convert a value ofTIMEUUIDinto a value of typeTIMESTAMP.
-
unixTimestampOfFct
public static final NativeScalarFunction unixTimestampOfFct
Deprecated.Replaced by thetoUnixTimestamp(org.apache.cassandra.db.marshal.TemporalType<?>)functionFunction that convert a value of typeTIMEUUIDinto an UNIX timestamp.
-
floorTime
public static final NativeScalarFunction floorTime
Function that rounds a time down to the closest multiple of a duration.
-
-
Method Detail
-
all
public static java.util.Collection<Function> all()
-
now
public static final Function now(java.lang.String name, TemporalType<?> type)
-
toDate
public static final NativeScalarFunction toDate(TemporalType<?> type)
Creates a function that convert 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 final NativeScalarFunction toTimestamp(TemporalType<?> type)
Creates a function that convert 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 final NativeScalarFunction toUnixTimestamp(TemporalType<?> type)
Creates a function that convert a value of the specified type into an UNIX timestamp.- Parameters:
type- the temporal type- Returns:
- a function that convert a value of the specified type into an UNIX timestamp.
-
-