芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/airport-back/vendor/yiisoft/yii2/db/mysql/JsonExpressionBuilder.php
* @since 2.0.14 */ class JsonExpressionBuilder implements ExpressionBuilderInterface { use ExpressionBuilderTrait; const PARAM_PREFIX = ':qp'; /** * {@inheritdoc} * @param JsonExpression|ExpressionInterface $expression the expression to be built */ public function build(ExpressionInterface $expression, array &$params = []) { $value = $expression->getValue(); if ($value instanceof Query) { list ($sql, $params) = $this->queryBuilder->build($value, $params); return "($sql)"; } $placeholder = static::PARAM_PREFIX . count($params); $params[$placeholder] = Json::encode($value); return "CAST($placeholder AS JSON)"; } }