OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.tests.DateTimeTest.DateAddUnit Enum Reference
+ Collaboration diagram for com.mapd.tests.DateTimeTest.DateAddUnit:

Public Attributes

 daYEAR
 
 daQUARTER
 
 daMONTH
 
 daDAY
 
 daHOUR
 
 daMINUTE
 
 daSECOND
 
 daMILLISECOND
 
 daMICROSECOND
 
 daNANOSECOND
 
 daWEEK
 

Private Member Functions

 DateAddUnit (String token, long max, Function< Pair< LocalDateTime, Long >, LocalDateTime > f)
 

Private Attributes

String sqlToken
 
Function< Pair< LocalDateTime,
Long >, LocalDateTime > 
add
 
long max
 

Detailed Description

Definition at line 451 of file DateTimeTest.java.

Constructor & Destructor Documentation

com.mapd.tests.DateTimeTest.DateAddUnit.DateAddUnit ( String  token,
long  max,
Function< Pair< LocalDateTime, Long >, LocalDateTime >  f 
)
inlineprivate

Definition at line 545 of file DateTimeTest.java.

547  {
548  this.sqlToken = token;
549  this.max = max;
550  this.add = f;
551  }

Member Data Documentation

Function<Pair<LocalDateTime, Long>, LocalDateTime> com.mapd.tests.DateTimeTest.DateAddUnit.add
private

Definition at line 542 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daDAY
Initial value:
=("DAY", 99, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.DAYS);
}
})

Definition at line 470 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daHOUR
Initial value:
=("HOUR", 99, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.HOURS);
}
})

Definition at line 476 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daMICROSECOND
Initial value:
=("MICROSECOND",
12 * 30 * 24 * 60 * 60 * 1000 * 1000,
new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.MICROS);
}
})

Definition at line 505 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daMILLISECOND
Initial value:
=("MILLISECOND",
12 * 30 * 24 * 60 * 60 * 1000L,
new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.MILLIS);
}
})

Definition at line 497 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daMINUTE
Initial value:
=("MINUTE", 99, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.MINUTES);
}
})

Definition at line 482 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daMONTH
Initial value:
=("MONTH", 99, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.MONTHS);
}
})

Definition at line 464 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daNANOSECOND
Initial value:
=("NANOSECOND",
12 * 30 * 24 * 60 * 60 * 1000 * 1000 * 1000,
new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.NANOS);
}
})

Definition at line 513 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daQUARTER
Initial value:
=(
"QUARTER", 10 * 3, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond() * 3, ChronoUnit.MONTHS);
}
})

Definition at line 457 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daSECOND
Initial value:
=("SECOND", 99, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.SECONDS);
}
})

Definition at line 488 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daWEEK
Initial value:
=("WEEK", 53, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
@Override
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.WEEKS);
}
})

Definition at line 521 of file DateTimeTest.java.

com.mapd.tests.DateTimeTest.DateAddUnit.daYEAR
Initial value:
=("YEAR", 99, new Function<Pair<LocalDateTime, Long>, LocalDateTime>() {
public LocalDateTime apply(Pair<LocalDateTime, Long> t) {
return t.getFirst().plus(t.getSecond(), ChronoUnit.YEARS);
}
})

Definition at line 452 of file DateTimeTest.java.

long com.mapd.tests.DateTimeTest.DateAddUnit.max
private

Definition at line 543 of file DateTimeTest.java.

String com.mapd.tests.DateTimeTest.DateAddUnit.sqlToken
private

Definition at line 541 of file DateTimeTest.java.


The documentation for this enum was generated from the following file: