* @return null|ResultWrapper
* @throws Exception
*/
- public function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__,
+ public function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__,
$insertOptions = [], $selectOptions = []
) {
$this->mScrollableCursor = false;
try {
- $ret = parent::insertSelect(
+ $ret = parent::nativeInsertSelect(
$destTable,
$srcTable,
$varMap,
*/
private function escapeIdentifier( $identifier ) {
if ( strlen( $identifier ) == 0 ) {
- throw new MWException( "An identifier must not be empty" );
+ throw new InvalidArgumentException( "An identifier must not be empty" );
}
if ( strlen( $identifier ) > 128 ) {
- throw new MWException( "The identifier '$identifier' is too long (max. 128)" );
+ throw new InvalidArgumentException( "The identifier '$identifier' is too long (max. 128)" );
}
if ( ( strpos( $identifier, '[' ) !== false )
|| ( strpos( $identifier, ']' ) !== false )
) {
// It may be allowed if you quoted with double quotation marks, but
// that would break if QUOTED_IDENTIFIER is OFF
- throw new MWException( "Square brackets are not allowed in '$identifier'" );
+ throw new InvalidArgumentException( "Square brackets are not allowed in '$identifier'" );
}
return "[$identifier]";
}
// we want this to be compatible with the output of parent::makeSelectOptions()
- return [ $startOpts, '', $tailOpts, '' ];
+ return [ $startOpts, '', $tailOpts, '', '' ];
}
/**