-
Couldn't load subscription status.
- Fork 47
Add Model\UnionModel model
#677
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
base: develop
Are you sure you want to change the base?
Conversation
3995cc8 to
e545879
Compare
3827e56 to
189782c
Compare
189782c to
691d9bd
Compare
4c75866 to
ee88bb5
Compare
6e9862c to
a82a108
Compare
| $unionPaymentInvoice->addField('type'); | ||
| ``` | ||
|
|
||
| A new field "type" has been added that will be defined as a static constant. |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
There was a problem hiding this 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
| private function createUnionQuery(array $subqueries): Persistence\Sql\Query | ||
| { | ||
| $unionQuery = $this->getPersistence()->dsql(); | ||
| $unionQuery->mode = 'union_all'; |
There was a problem hiding this comment.
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`', |
There was a problem hiding this comment.
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.
No description provided.