public function toDialectString(Dialect $dialect) { if ($this->type == DataType::JSON || $this->type == DataType::JSONB) { return $dialect->quoteJson($this->getValue(), $this->type); } else { return $dialect->quoteArray($this->getValue(), $this->type); } }