X-Git-Url: https://git.heureux-cyclage.org/w/index.php?a=blobdiff_plain;f=includes%2Fdb%2FDatabaseSqlite.php;h=ef08ab07058f7632bcf04fcf86690cea4044b3cd;hb=56195efaa10e10d67d5f7e85029d64df52a0f7aa;hp=5bbba886e1dc7e648070a82c1ef5b3e65ddaf276;hpb=0687f250d6fb4196a7aa60af4fe11c7d21f3c455;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 5bbba886e1..ef08ab0705 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -832,6 +832,15 @@ class DatabaseSqlite extends Database { return parent::buildLike( $params ) . "ESCAPE '\' "; } + /** + * @param string $field Field or column to cast + * @return string + * @since 1.28 + */ + public function buildStringCast( $field ) { + return 'CAST ( ' . $field . ' AS TEXT )'; + } + /** * @return string */ @@ -953,7 +962,7 @@ class DatabaseSqlite extends Database { $this->addQuotes( $oldName ) . " AND type='table'", $fname ); $obj = $this->fetchObject( $res ); if ( !$obj ) { - throw new MWException( "Couldn't retrieve structure for table $oldName" ); + throw new RuntimeException( "Couldn't retrieve structure for table $oldName" ); } $sql = $obj->sql; $sql = preg_replace(