Merge "purgeExpiredUserrights: Show number of rows purged"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / DatabaseSqlite.php
index 3d6cee3..83c8814 100644 (file)
@@ -818,6 +818,15 @@ class DatabaseSqlite extends Database {
                }
        }
 
+       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