Merge "build: Switch QUnit package from deprecated 'qunitjs' to 'qunit'" into REL1_31
[lhc/web/wiklou.git] / includes / db / DatabaseOracle.php
index 225a36c..3362f0f 100644 (file)
@@ -1358,6 +1358,15 @@ class DatabaseOracle extends Database {
                return '(' . $this->selectSQLText( $table, $fld, $conds, null, [], $join_conds ) . ')';
        }
 
+       public function buildSubstring( $input, $startPosition, $length = null ) {
+               $this->assertBuildSubstringParams( $startPosition, $length );
+               $params = [ $input, $startPosition ];
+               if ( $length !== null ) {
+                       $params[] = $length;
+               }
+               return 'SUBSTR(' . implode( ',', $params ) . ')';
+       }
+
        /**
         * @param string $field Field or column to cast
         * @return string