Skip to content

Fix multi-line insert return type#330

Merged
dg merged 3 commits into
nette:masterfrom
KminekMatej:fix/multi-insert-returns-int
Jun 6, 2026
Merged

Fix multi-line insert return type#330
dg merged 3 commits into
nette:masterfrom
KminekMatej:fix/multi-insert-returns-int

Conversation

@KminekMatej
Copy link
Copy Markdown
Contributor

Multi-line inserting wasnt returning numeric number of affected rows but ActiveRow instead (with first inserted record).

This fix checks if the $data inserted is actually a two-dimensional array and if so, returns number of affected rows instead of the ActiveRow.

Tests were added as well since this path was not guarded

@dg
Copy link
Copy Markdown
Member

dg commented Jun 6, 2026

Thanks

@dg dg merged commit 986e24a into nette:master Jun 6, 2026
dg pushed a commit that referenced this pull request Jun 7, 2026
dg pushed a commit that referenced this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants