Revert revert of setSingleton(), unrelated to broken, accidentally committed code...
[lhc/web/wiklou.git] / includes / DatabaseOracle.php
index 9c6bb71..3848548 100644 (file)
@@ -2,6 +2,7 @@
 
 /**
  * This is the Oracle database abstraction layer.
+ * @addtogroup Database
  */
 class ORABlob {
        var $mData;
@@ -19,6 +20,7 @@ class ORABlob {
  * The oci8 extension is fairly weak and doesn't support oci_num_rows, among 
  * other things.  We use a wrapper class to handle that and other 
  * Oracle-specific bits, like converting column names back to lowercase.
+ * @addtogroup Database
  */
 class ORAResult {
        private $rows;
@@ -82,8 +84,11 @@ class ORAResult {
                }
                return $ret;
        }
-};
+}
 
+/**
+ * @addtogroup Database
+ */
 class DatabaseOracle extends Database {
        var $mInsertId = NULL;
        var $mLastResult = NULL;
@@ -123,6 +128,9 @@ class DatabaseOracle extends Database {
        function implicitGroupby() {
                return false;
        }
+       function implicitOrderby() {
+               return false;
+       }
        function searchableIPs() {
                return true;
        }
@@ -384,7 +392,7 @@ class DatabaseOracle extends Database {
        }
 
        /**
-        * ORacle does not have a "USE INDEX" clause, so return an empty string
+        * Oracle does not have a "USE INDEX" clause, so return an empty string
         */
        function useIndexClause($index) {
                return '';
@@ -654,7 +662,7 @@ echo "error!\n";
 
                #if ( isset( $noKeyOptions['FOR UPDATE'] ) ) $tailOpts .= ' FOR UPDATE';
                #if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) $tailOpts .= ' LOCK IN SHARE MODE';
-               if ( isset( $noKeyOptions['DISTINCT'] ) && isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT';
+               if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) $startOpts .= 'DISTINCT';
 
                if ( isset( $options['USE INDEX'] ) && ! is_array( $options['USE INDEX'] ) ) {
                        $useIndex = $this->useIndexClause( $options['USE INDEX'] );
@@ -670,11 +678,20 @@ echo "error!\n";
        }
 
        function ping() {
-               wfDebug( "Function ping() not written for DatabasePostgres.php yet");
+               wfDebug( "Function ping() not written for DatabaseOracle.php yet");
                return true;
        }
 
+       /**
+        * How lagged is this slave?
+        *
+        * @return int
+        */
+       public function getLag() {
+               # Not implemented for Oracle
+               return 0;
+       }
 
 } // end DatabaseOracle class
 
-?>
+