From 978aecd7a873aab81fc8667f999d173ceb56b40b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 23 Oct 2025 10:53:12 +0900 Subject: [PATCH] Support SQL expressions in the "default" attribute of XML query --- common/framework/parsers/dbquery/VariableBase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/framework/parsers/dbquery/VariableBase.php b/common/framework/parsers/dbquery/VariableBase.php index f4e29a0c5..419c74e95 100644 --- a/common/framework/parsers/dbquery/VariableBase.php +++ b/common/framework/parsers/dbquery/VariableBase.php @@ -383,6 +383,12 @@ class VariableBase } } + // If the default value is any other kind of SQL expression, return it as is. + if (isset($column) && preg_match('/^[A-Z_]+\([^)]+\)/', $this->default)) + { + return [true, $this->default]; + } + // Otherwise, just return the literal value. return [false, $this->default]; }