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
*/
$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(