* [story#59810,0.5h] add sql format.

This commit is contained in:
qixinzhi
2024-09-04 16:10:43 +08:00
committed by 代婷婷
parent 7ff357aff2
commit f648e331b0
@@ -234,7 +234,9 @@ class Condition extends Component
if (is_array($component)) {
return implode(' ', $component);
}
return $component->expr . PHP_EOL;
$expr = (string)$component->expr;
$expr = str_replace('AND', PHP_EOL . 'AND' , $expr);
$expr = str_replace('OR', PHP_EOL . 'OR' , $expr);
return $expr;
}
}