Skip to content

Conversation

@georgehristov
Copy link
Collaborator

@georgehristov georgehristov commented Jul 26, 2020

No description provided.

@georgehristov georgehristov force-pushed the feature/introduce-aggregate-union-models branch from 3995cc8 to e545879 Compare July 26, 2020 21:46
@georgehristov georgehristov force-pushed the feature/introduce-aggregate-union-models branch 3 times, most recently from 3827e56 to 189782c Compare July 27, 2020 06:37
@georgehristov georgehristov force-pushed the feature/introduce-aggregate-union-models branch from 189782c to 691d9bd Compare July 27, 2020 07:13
@georgehristov georgehristov reopened this Jul 27, 2020
@georgehristov georgehristov marked this pull request as ready for review July 27, 2020 09:10
@georgehristov georgehristov force-pushed the feature/introduce-aggregate-union-models branch from 4c75866 to ee88bb5 Compare July 27, 2020 09:22
@georgehristov georgehristov changed the title Introduce aggregate and union models Introduce Model\Aggregate and Model\Union models Jul 27, 2020
@georgehristov georgehristov marked this pull request as draft July 27, 2020 17:14
@mvorisek mvorisek force-pushed the feature/introduce-aggregate-union-models branch from 6e9862c to a82a108 Compare February 21, 2024 15:27
$unionPaymentInvoice->addField('type');
```

A new field "type" has been added that will be defined as a static constant.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "static constant" here? Minimal example would be good.

Copy link
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't review codebase, but in documentation there are some errors to fix.

Copy link
Member

@mvorisek mvorisek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevent accidental merge

impl. is still probably problematic and tests should be cleaned up

@atk4 atk4 deleted a comment from DarkSide666 Mar 18, 2024
@atk4 atk4 deleted a comment from DarkSide666 Mar 18, 2024
@atk4 atk4 deleted a comment from DarkSide666 Mar 18, 2024
@atk4 atk4 deleted a comment from DarkSide666 Mar 18, 2024
@atk4 atk4 deleted a comment from DarkSide666 Mar 18, 2024
private function createUnionQuery(array $subqueries): Persistence\Sql\Query
{
$unionQuery = $this->getPersistence()->dsql();
$unionQuery->mode = 'union_all';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subqueries must support order by, limit or double wrap then to workaround

$transaction = $this->createTransaction();

$this->assertSameSql(
'select `name` `name` from `invoice` UNION ALL select `name` `name` from `payment`',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 1) Atk4\Data\Tests\Persistence\Sql\MaterializedArrayActionTest::testRenderMultipleRows
Atk4\Data\Persistence\Sql\ExecuteException: An exception occurred while executing a query: ORA-01790: expression must have same datatype as corresponding expression
  query: 'select
      true "bool",
      -9223372036854775808 "int",
      -1.5E - 50 "float",
      '' "string"
    from
      "DUAL"
    union all
    select
      NULL,
      9223372036854775807,
      1.0123456789123E + 300,
      ' foo
    '
    from
      "DUAL"'

The ORA-01790 Oracle error is caused when one select selects null from untyped table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants