From 33a2672121f96554b4b8b8f7ad162655fc2554b3 Mon Sep 17 00:00:00 2001 From: zhaoxiang Date: Tue, 8 May 2018 18:21:58 +0800 Subject: [PATCH] =?UTF-8?q?modified=20=E6=96=B0=E5=A2=9E=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=9A=84Expression=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thinkphp/library/think/db/Expression.php | 48 ++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 thinkphp/library/think/db/Expression.php diff --git a/thinkphp/library/think/db/Expression.php b/thinkphp/library/think/db/Expression.php new file mode 100755 index 0000000..f1b92ab --- /dev/null +++ b/thinkphp/library/think/db/Expression.php @@ -0,0 +1,48 @@ + +// +---------------------------------------------------------------------- + +namespace think\db; + +class Expression +{ + /** + * 查询表达式 + * + * @var string + */ + protected $value; + + /** + * 创建一个查询表达式 + * + * @param string $value + * @return void + */ + public function __construct($value) + { + $this->value = $value; + } + + /** + * 获取表达式 + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + public function __toString() + { + return (string) $this->value; + } +}