DynamicActiveRecord.php
protected static function dynColSqlMaria(array $attrs, & $params)
    {
        $sql = [];
        foreach ($attrs as $key => $value) {
            if (is_object($value) && !($value instanceof ValueExpression)) {
                $value = method_exists($value, 'toArray') ? $value->toArray() : (array) $value;
            }
            if ($value === [] || $value === null) {
                continue;
            }

            $phKey = static::placeholder();
            $phValue = static::placeholder();
            $sql[] = $phKey;
            $params[$phKey] = $key;

            if ($value instanceof ValueExpression || is_float($value)) {
                $sql[] = $value;
            } elseif (is_scalar($value)) {
                $sql[] = $phValue;
                $params[$phValue] = $value;
            } elseif (is_array($value)) {
                $sql[] = static::dynColSqlMaria($value, $params);
            }
        }

        return $sql === [] ? 'null' : 'COLUMN_CREATE(' . implode(',', $sql) . ')';
    }
protected static function dynColSqlMaria(array $attrs, & $params)
    {
        $sql = [];
        foreach ($attrs as $key => $value) {
            if (is_object($value) && !($value instanceof ValueExpression)) {
                $value = method_exists($value, 'toArray') ? $value->toArray() : (array) $value;
            }
            if ($value === [] || $value === null) {
                continue;
            }

            $phKey = static::placeholder();
            $phValue = static::placeholder();
            $sql[] = $phKey;
            $params[$phKey] = $key;

            if ($value instanceof ValueExpression || is_float($value)) {
                $sql[] = $value;
            } elseif (is_scalar($value)) {
                $sql[] = $phValue;
                $params[$phValue] = $value;
            } elseif (is_array($value)) {
                $sql[] = static::dynColSqlMaria($value, $params);
            }
        }

        return $sql === [] ? 'null' : 'COLUMN_CREATE(' . implode(',', $sql) . ')';
    }
protected static function dynColSqlMaria ( array $ attrs , & $ params ) { $ sql = [ ] ; foreach ( $ attrs as $ key => $ value ) { if ( is_object ( $ value ) && ! ( $ value instanceof ValueExpression ) ) { $ value = method_exists ( $ value , 'toArray' ) ? $ value -> toArray ( ) : ( array ) $ value ; } if ( $ value === [ ] || $ value === null ) { continue ; } $ phKey = static :: placeholder ( ) ; $ phValue = static :: placeholder ( ) ; $ sql [ ] = $ phKey ; $ params [ $ phKey ] = $ key ; if ( $ value instanceof ValueExpression || is_float ( $ value ) ) { $ sql [ ] = $ value ; } elseif ( is_scalar ( $ value ) ) { $ sql [ ] = $ phValue ; $ params [ $ phValue ] = $ value ; } elseif ( is_array ( $ value ) ) { $ sql [ ] = static :: dynColSqlMaria ( $ value , $ params ) ; } } return $ sql === [ ] ? 'null' : 'COLUMN_CREATE(' . implode ( ',' , $ sql ) . ')' ; }
Creates the SQL and parameter bindings for setting dynamic attributes
in a DB record as Dynamic Columns in Maria.

@param array $attrs the dynamic attributes, which may be nested
@param array $params expression parameters for binding, passed by reference

@return string SQL for a DB Expression
@throws \yii\base\Exception
Creates the SQL and parameter bindings for setting dynamic attributes in a DB record as Dynamic Columns in Maria .