fix: SQLSRV driver's decrement() method#10155
fix: SQLSRV driver's decrement() method#10155patel-vansh wants to merge 3 commits intocodeigniter4:developfrom
decrement() method#10155Conversation
|
I am quite unsure about the tests in this case. Do I need to add a new file in tests/system/Database/Live/SQLSRV directory? Or add a particular test inside the normal |
|
The new class under the SQLSRV directory would be better. Please add tests for both |
Idk if I've added the tests as expected, as I didn't found any direct option to modify |
| $this->db->table('job')->castTextToInt = false; | ||
|
|
||
| $this->db->table('job') | ||
| ->where('name', 'incremental') |
There was a problem hiding this comment.
It would be nicer if you could do something like this:
| $this->db->table('job')->castTextToInt = false; | |
| $this->db->table('job') | |
| ->where('name', 'incremental') | |
| $builder = $this->db->table('job'); | |
| $builder->castTextToInt = false; | |
| $builder->where('name', 'incremental') |
But overall, this is good.
Description
As discovered by @paulbalandan in this comment, SQLSRV Database Driver was incorrectly adding instead of subtracting the decrement value when
$castTextToIntwas false.This PR fixes that bug by flipping the sign in
decrement()function.Checklist: