Sbisson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316689

Change subject: [WIP] Remove index layer
......................................................................

[WIP] Remove index layer

Bug: T147058
Change-Id: I94fa23845797c94b84f062ffd97dce22a021e9c5
---
M includes/Data/ObjectLocator.php
1 file changed, 24 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/89/316689/1

diff --git a/includes/Data/ObjectLocator.php b/includes/Data/ObjectLocator.php
index 8b326cd..171584e 100644
--- a/includes/Data/ObjectLocator.php
+++ b/includes/Data/ObjectLocator.php
@@ -53,7 +53,7 @@
                $this->storage = $storage;
                $this->indexes = $indexes;
                $this->dbFactory = $dbFactory;
-               $this->lifecycleHandlers = array_merge( $indexes, 
$lifecycleHandlers );
+               $this->lifecycleHandlers = $lifecycleHandlers; //array_merge( 
$indexes, $lifecycleHandlers );
        }
 
        public function getMapper() {
@@ -84,24 +84,25 @@
                        $options['sort'] = ObjectManager::makeArray( 
$options['sort'] );
                }
 
-               try {
-                       $index = $this->getIndexFor( $keys, $options );
-                       $res = $index->findMulti( $queries, $options );
-               } catch ( NoIndexException $e ) {
-                       if ( array_search( 'topic_root_id', $keys ) ) {
-                               wfDebugLog(
-                                       'Flow',
-                                       __METHOD__ . ': '
-                                       . json_encode( $keys ) . ' : '
-                                       . json_encode( $options ) . ' : '
-                                       . json_encode( array_map( 'get_class', 
$this->indexes ) )
-                               );
-                               \MWExceptionHandler::logException( $e );
-                       } else {
-                               wfDebugLog( 'FlowDebug', __METHOD__ . ': ' . 
$e->getMessage() );
-                       }
-                       $res = $this->storage->findMulti( 
$this->convertToDbQueries( $queries, $options ), $this->convertToDbOptions( 
$options ) );
-               }
+               $res = $this->storage->findMulti( $this->convertToDbQueries( 
$queries, $options ), $this->convertToDbOptions( $options ) );
+//             try {
+//                     $index = $this->getIndexFor( $keys, $options );
+//                     $res = $index->findMulti( $queries, $options );
+//             } catch ( NoIndexException $e ) {
+//                     if ( array_search( 'topic_root_id', $keys ) ) {
+//                             wfDebugLog(
+//                                     'Flow',
+//                                     __METHOD__ . ': '
+//                                     . json_encode( $keys ) . ' : '
+//                                     . json_encode( $options ) . ' : '
+//                                     . json_encode( array_map( 'get_class', 
$this->indexes ) )
+//                             );
+//                             \MWExceptionHandler::logException( $e );
+//                     } else {
+//                             wfDebugLog( 'FlowDebug', __METHOD__ . ': ' . 
$e->getMessage() );
+//                     }
+//                     $res = $this->storage->findMulti( 
$this->convertToDbQueries( $queries, $options ), $this->convertToDbOptions( 
$options ) );
+//             }
 
                $output = array();
                foreach( $res as $index => $queryOutput ) {
@@ -127,7 +128,8 @@
         * @return bool
         */
        public function found( array $attributes, array $options = array() ) {
-               return $this->foundMulti( array( $attributes ), $options );
+//             return $this->foundMulti( array( $attributes ), $options );
+               return false;
        }
 
        /**
@@ -221,7 +223,8 @@
         * @return bool
         */
        public function got( $id ) {
-               return $this->gotMulti( array( $id ) );
+//             return $this->gotMulti( array( $id ) );
+               return false;
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/316689
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94fa23845797c94b84f062ffd97dce22a021e9c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <sbis...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to