CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

Bug: prepared statement execute() returns Result object for all queries

Open kenjis opened this issue 4 years ago • 1 comments

Describe the bug In the CI4 spec, query() returns bool for write-type queries. But the current implementation of execute() returns Result object for all queries.

Isn't it a bug?

See https://github.com/codeigniter4/CodeIgniter4/pull/4176#issuecomment-784805837.

CodeIgniter 4 version develop branch.

Affected module(s) Database

Expected behavior, and steps to reproduce if appropriate The same as query() return value.

kenjis avatar Feb 25 '21 00:02 kenjis

Yes, for write-type queries we should have a boolean result.

michalsn avatar Feb 25 '21 06:02 michalsn

Does https://github.com/codeigniter4/CodeIgniter4/pull/6750 close this?

sclubricants avatar Oct 24 '22 22:10 sclubricants

Yes.

kenjis avatar Oct 24 '22 23:10 kenjis

Closed by #6750

kenjis avatar Nov 01 '22 03:11 kenjis