Skip to content

Bug: [Postgres] Can't use $builder->replace() multiple times in a method #6726

@nalakapws

Description

@nalakapws

PHP Version

8.1

CodeIgniter4 Version

4.2.6

CodeIgniter4 Installation Method

Manual (zip or tar.gz)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

PostgreSQL

What happened?

Can't use $builder->replace(); statement multiple times in a method. I don't know if that is by design. But in CI3 we can use replace statement multiple times, like in a loop.

Thanks.

Steps to Reproduce

Just kind of this type method,

public function replaceStuff(array $rows)
{
        $builder = $this->db->table('records');

        $builder->replace($rows[0]);
        $builder->replace($rows[1]);
}

Expected Output

Replace multiple records at once.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themdatabaseIssues or pull requests that affect the database layer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions