Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DMLQueryBuilder #746

Merged
merged 26 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7145e81
Refactor DMLQueryBuilder
Tigrov Aug 18, 2023
dbe3957
Get uniques using `getTableIndexes()` and `getTableUniques()`
Tigrov Aug 19, 2023
57ece13
Fix @psalm-var
Tigrov Aug 19, 2023
de98665
Fix #61 (point 2)
Tigrov Aug 19, 2023
ef2fa1b
Fix #61 (point 2) add test
Tigrov Aug 20, 2023
cab52c5
Improve test
Tigrov Aug 21, 2023
230859a
Remove methods with `NotSupportedException`
Tigrov Aug 22, 2023
a6a7b64
Fix test issues
Tigrov Aug 22, 2023
adfae64
Fix test issues
Tigrov Aug 22, 2023
d07b871
Revert "Remove methods with `NotSupportedException`"
Tigrov Aug 22, 2023
a26b3ac
Add line to CHANGELOG.md
Tigrov Aug 26, 2023
91c1167
Merge branch 'master' into refactor_dml_query_builder
Tigrov Aug 26, 2023
ae66957
Change order of checks
Tigrov Sep 6, 2023
c0ced2f
Merge remote-tracking branch 'origin/master' into refactor_dml_query_…
Tigrov Sep 6, 2023
b82cb14
Improve performance of quoting column names up to 10% using `array_ma…
Tigrov Oct 4, 2023
b4ffbb8
Merge branch 'master' into refactor_dml_query_builder
Tigrov Oct 27, 2023
47746f8
Update CHANGELOG.md
Tigrov Oct 28, 2023
da705d2
remove `Generator` in `DMLQueryBuilderInterface`
Tigrov Oct 30, 2023
510afd1
Update psalm
Tigrov Oct 30, 2023
911996c
Apply suggestions from code review
Tigrov Oct 30, 2023
8aa612a
Apply StyleCI
Tigrov Oct 30, 2023
70cd177
Remove `Generator` from other places
Tigrov Oct 31, 2023
ee4b859
Return and deprecate `getTypecastValue()` method and `$table` parameter
Tigrov Oct 31, 2023
ddfe79d
Fix psalm
Tigrov Oct 31, 2023
0fe88c1
Fix psalm
Tigrov Oct 31, 2023
fda606c
Update CHANGELOG.md
vjik Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 1.1.2 under development

- Enh #746: Refactor `AbstractDMLQueryBuilder` (@Tigrov)
- Bug #746: Fix `AbstractDMLQueryBuilder::upsert()` when unique index is not at the first position of inserted values (@Tigrov)
- Bug #746: Typecast values in `AbstractDMLQueryBuilder::batchInsert()` if column names with table name and brackets (@Tigrov)
- Bug #746, #61: Typecast values in `AbstractDMLQueryBuilder::batchInsert()` if values with string keys (@Tigrov)
- Enh #746: Enhanced documentation of `batchInsert()` and `update()` methods of `DMLQueryBuilderInterface` interface (@Tigrov)
- Bug #751: Fix collected debug actions (@xepozz)
- Chg #755: Deprecate `TableSchemaInterface::compositeForeignKey()` (@Tigrov)
- Enh #756: Refactor `Quoter` (@Tigrov)
Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
</issueHandlers>
</psalm>
4 changes: 4 additions & 0 deletions src/Command/CommandInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public function alterColumn(string $table, string $column, ColumnInterface|strin
* @throws Exception
* @throws InvalidArgumentException
*
* @psalm-param iterable<array-key, array<array-key, mixed>> $rows
*
* Note: The method will quote the `table` and `column` parameters before using them in the generated SQL.
*/
public function batchInsert(string $table, array $columns, iterable $rows): static;
Expand Down Expand Up @@ -820,6 +822,8 @@ public function update(string $table, array $columns, array|string $condition =
* @throws JsonException
* @throws NotSupportedException
*
* @psalm-param array<string, mixed>|QueryInterface $insertColumns
*
* Note: The method will quote the `table` and `insertColumns`, `updateColumns` parameters before using it in the
* generated SQL.
*/
Expand Down
Loading
Loading