47 $this->rangeConds = [];
50 if ( $startStamp !==
'' ) {
51 $startTimestamp = MWTimestamp::getInstance( $startStamp );
52 $startOffset = $this->mDb->timestamp( $startTimestamp->getTimestamp() );
53 $this->rangeConds[] = $this->mIndexField .
'>=' . $this->mDb->addQuotes( $startOffset );
56 if ( $endStamp !==
'' ) {
57 $endTimestamp = MWTimestamp::getInstance( $endStamp );
58 $endOffset = $this->mDb->timestamp( $endTimestamp->getTimestamp() );
59 $this->rangeConds[] = $this->mIndexField .
'<=' . $this->mDb->addQuotes( $endOffset );
62 $this->mYear = (int)$endTimestamp->format(
'Y' );
63 $this->mMonth = (int)$endTimestamp->format(
'm' );
64 $this->mDay = (int)$endTimestamp->format(
'd' );
65 $this->mOffset = $endOffset;
67 }
catch ( TimestampException $ex ) {
108 list( $tables, $fields, $conds, $fname, $options, $join_conds ) = parent::buildQueryInfo(
114 if ( $this->rangeConds ) {
115 $conds = array_merge( $conds, $this->rangeConds );
118 return [ $tables, $fields, $conds, $fname, $options, $join_conds ];