diff --git a/framework/db/QueryBuilder.php b/framework/db/QueryBuilder.php index 114116e67c5..b821260b91d 100644 --- a/framework/db/QueryBuilder.php +++ b/framework/db/QueryBuilder.php @@ -1054,12 +1054,13 @@ public function resetSequence($table, $value = null) * @param string $table the name of the table whose primary key sequence is reset * @param array|string|null $value the value for the primary key of the next new row inserted. If this is not set, * the next new row's primary key will have the maximum existing value +1. + * @return int number of rows affected by the execution. * @throws NotSupportedException if this is not supported by the underlying DBMS * @since 2.0.16 */ public function executeResetSequence($table, $value = null) { - $this->db->createCommand()->resetSequence($table, $value)->execute(); + return $this->db->createCommand()->resetSequence($table, $value)->execute(); } /**