24 use Wikimedia\Timestamp\TimestampException;
58 $this->rangeConds = [];
61 if ( $startTime !==
'' ) {
63 $this->startOffset = $this->mDb->timestamp( $startTimestamp->getTimestamp() );
64 $this->rangeConds[] = $this->mDb->buildComparison(
'>=',
68 if ( $endTime !==
'' ) {
72 $endTimestamp->timestamp = $endTimestamp->timestamp->modify(
'+1 second' );
73 $this->endOffset = $this->mDb->timestamp( $endTimestamp->getTimestamp() );
74 $this->rangeConds[] = $this->mDb->buildComparison(
'<',
78 $this->mYear = (int)$endTimestamp->format(
'Y' );
79 $this->mMonth = (int)$endTimestamp->format(
'm' );
80 $this->mDay = (int)$endTimestamp->format(
'd' );
82 }
catch ( TimestampException $ex ) {
104 [ $tables, $fields, $conds, $fname, $options, $join_conds ] = parent::buildQueryInfo(
110 if ( $this->startOffset ) {
111 $conds[] = $this->mDb->buildComparison(
'>=', [ $this->
getTimestampField() => $this->startOffset ] );
112 } elseif ( $this->rangeConds ) {
114 $conds = array_merge( $conds, $this->rangeConds );
117 return [ $tables, $fields, $conds, $fname, $options, $join_conds ];
125 class_alias( RangeChronologicalPager::class,
'RangeChronologicalPager' );