mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: simplify overlapsI expression in postgresql
This commit is contained in:
parent
8fabfdd5c0
commit
398b633863
5
.changes/unreleased/DX-20230614-233000.yaml
Normal file
5
.changes/unreleased/DX-20230614-233000.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
kind: DX
|
||||||
|
body: 'DQL function OVERLAPSI: simplify expression in postgresql'
|
||||||
|
time: 2023-06-14T23:30:00.217427234+02:00
|
||||||
|
custom:
|
||||||
|
Issue: ""
|
@ -90,16 +90,14 @@ class OverlapsI extends FunctionNode
|
|||||||
|
|
||||||
if ($part instanceof PathExpression) {
|
if ($part instanceof PathExpression) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
"CASE WHEN %s IS NOT NULL THEN %s ELSE '%s'::date END",
|
"COALESCE(%s, '%s'::date)",
|
||||||
$part->dispatch($sqlWalker),
|
|
||||||
$part->dispatch($sqlWalker),
|
$part->dispatch($sqlWalker),
|
||||||
$p
|
$p
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sprintf(
|
return sprintf(
|
||||||
"CASE WHEN %s::date IS NOT NULL THEN %s::date ELSE '%s'::date END",
|
"COALESCE(%s::date, '%s'::date)",
|
||||||
$part->dispatch($sqlWalker),
|
|
||||||
$part->dispatch($sqlWalker),
|
$part->dispatch($sqlWalker),
|
||||||
$p
|
$p
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user