$stmt->allowRowCount = TRUE;
return $stmt->
rowCount();
case Database::RETURN_INSERT_ID:
$sequence_name =
$options['sequence_name'
] ?? NULL;
return $this->
lastInsertId($sequence_name);
case Database::RETURN_NULL:
return NULL;
default:
throw new \
PDOException('Invalid return directive: ' .
$options['return'
]);
} } catch (\Exception
$e) { $this->
exceptionHandler()->
handleExecutionException($e,
$stmt,
$args,
$options);
} } /**
* Expands out shorthand placeholders.
*
* Drupal supports an alternate syntax for doing arrays of values. We
* therefore need to expand them out into a full, executable query string.
*
* @param string $query
* The query string to modify.
* @param array $args
* The arguments for the query.
*
* @return bool
* TRUE if the query was modified, FALSE otherwise.
*
* @throws \InvalidArgumentException
* This exception is thrown when:
* - A placeholder that ends in [] is supplied, and the supplied value is
* not an array.
* - A placeholder that does not end in [] is supplied, and the supplied
* value is an array.
*/