Lines Matching refs:query
109 $query = DB::table('dates')
111 ->where(static function (Builder $query) use ($jd1, $jd2): void {
112 $query->where(static function (Builder $query) use ($jd1, $jd2): void {
113 $query
116 })->orWhere(static function (Builder $query) use ($jd1, $jd2): void {
117 $query
125 $query->whereNotIn('d_fact', self::SKIP_FACTS);
129 $query->whereIn('d_fact', $matches[1]);
133 …$query->where('d_julianday1', '>=', Registry::timestampFactory()->now()->subtractYears(100)->julia…
136 $ind_query = (clone $query)
145 $fam_query = (clone $query)
285 $query = DB::table('dates')
294 $this->defaultAnniversaries($query, $anniv);
299 $this->cheshvanAnniversaries($query, $anniv);
302 $this->kislevAnniversaries($query, $anniv);
305 $this->tevetAnniversaries($query, $anniv);
308 $this->adarIIAnniversaries($query, $anniv);
311 $this->nisanAnniversaries($query, $anniv);
316 $query->where('d_year', '<=', $anniv->year());
320 $query->whereNotIn('d_fact', self::SKIP_FACTS);
325 $query->whereIn('d_fact', $matches[1]);
329 …$query->where('d_julianday1', '>=', Registry::timestampFactory()->now()->subtractYears(100)->julia…
332 $query
336 $ind_query = (clone $query)
345 $fam_query = (clone $query)
402 * @param Builder $query
405 private function defaultAnniversaries(Builder $query, AbstractCalendarDate $anniv): void argument
408 $query->where('d_day', '<=', 1);
410 $query->where('d_day', '>=', $anniv->daysInMonth());
412 $query->where('d_day', '=', $anniv->day());
415 $query->where('d_mon', '=', $anniv->month());
421 * @param Builder $query
424 private function cheshvanAnniversaries(Builder $query, JewishDate $anniv): void argument
427 $query
432 $this->defaultAnniversaries($query, $anniv);
440 * @param Builder $query
443 private function kislevAnniversaries(Builder $query, JewishDate $anniv): void argument
448 $query->where(static function (Builder $query): void {
449 $query->where(static function (Builder $query): void {
450 $query->where('d_day', '<=', 1)->where('d_mon', '=', 3);
451 })->orWhere(static function (Builder $query): void {
452 $query->where('d_day', '=', 30)->where('d_mon', '=', 2);
456 $query
461 $this->defaultAnniversaries($query, $anniv);
468 * @param Builder $query
471 private function tevetAnniversaries(Builder $query, JewishDate $anniv): void argument
476 $query->where(static function (Builder $query): void {
477 $query->where(static function (Builder $query): void {
478 $query->where('d_day', '<=', 1)->where('d_mon', '=', 4);
479 })->orWhere(static function (Builder $query): void {
480 $query->where('d_day', '=', 30)->where('d_mon', '=', 3);
484 $this->defaultAnniversaries($query, $anniv);
491 * @param Builder $query
494 private function adarIIAnniversaries(Builder $query, JewishDate $anniv): void argument
497 $query->where('d_day', '<=', 1);
499 $query->where('d_day', '>=', $anniv->daysInMonth());
502 $query->where('d_day', '<>', 30);
505 $query->where('d_day', '=', $anniv->day());
509 $query->where('d_mon', '=', 7);
511 $query->whereIn('d_mon', [6, 7]);
518 * @param Builder $query
521 private function nisanAnniversaries(Builder $query, JewishDate $anniv): void argument
524 $query->where(static function (Builder $query): void {
525 $query->where(static function (Builder $query): void {
526 $query->where('d_day', '<=', 1)->where('d_mon', '=', 8);
527 })->orWhere(static function (Builder $query): void {
528 $query->where('d_day', '=', 30)->where('d_mon', '=', 6);
532 $this->defaultAnniversaries($query, $anniv);