@@ 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 | }; |
@@ 766-768 (lines=3) @@ | ||
763 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
764 | $cursor->slaveOkay(true); |
|
765 | } |
|
766 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
767 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
768 | } |
|
769 | $documents = $cursor->toArray(false); |
|
770 | foreach ($documents as $documentData) { |
|
771 | $document = $this->uow->getById($documentData['_id'], $class); |
|
@@ 828-830 (lines=3) @@ | ||
825 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
826 | $qb->slaveOkay(true); |
|
827 | } |
|
828 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
829 | $qb->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
830 | } |
|
831 | ||
832 | return $qb->getQuery(); |
|
833 | } |
|
@@ 878-880 (lines=3) @@ | ||
875 | if ( ! empty($hints[Query::HINT_SLAVE_OKAY])) { |
|
876 | $cursor->slaveOkay(true); |
|
877 | } |
|
878 | if ( ! empty($hints[Query::HINT_READ_PREFERENCE])) { |
|
879 | $cursor->setReadPreference($hints[Query::HINT_READ_PREFERENCE], $hints[Query::HINT_READ_PREFERENCE_TAGS]); |
|
880 | } |
|
881 | ||
882 | return $cursor; |
|
883 | } |