@@ 84-86 (lines=3) @@ | ||
81 | $qb->slaveOkay(true); |
|
82 | } |
|
83 | ||
84 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
85 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
86 | } |
|
87 | ||
88 | $qb->getQuery()->execute()->toArray(false); |
|
89 | }; |
@@ 758-760 (lines=3) @@ | ||
755 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
756 | $cursor->slaveOkay(true); |
|
757 | } |
|
758 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
759 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
760 | } |
|
761 | $documents = $cursor->toArray(false); |
|
762 | foreach ($documents as $documentData) { |
|
763 | $document = $this->uow->getById($documentData['_id'], $class); |
|
@@ 818-820 (lines=3) @@ | ||
815 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
816 | $qb->slaveOkay(true); |
|
817 | } |
|
818 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
819 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
820 | } |
|
821 | ||
822 | return $qb->getQuery(); |
|
823 | } |
|
@@ 868-870 (lines=3) @@ | ||
865 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
866 | $cursor->slaveOkay(true); |
|
867 | } |
|
868 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
869 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
870 | } |
|
871 | ||
872 | return $cursor; |
|
873 | } |