<commit_before><?php

namespace Maghead\Runtime;

use Maghead\DSN\DSNParser;
use Maghead\DSN\DSN;
use Maghead\Runtime\Connector\PDOMySQLConnector;
use SQLBuilder\Driver\PDODriverFactory;
use SQLBuilder\Raw;

use PDO;

class Connection extends PDO
{
    /**
     * @var array
     */
    public $config;

    /**
     * @var string
     */
    protected $user;

    /**
     * @var string
     */
    protected $pass;

    /**
     * @var Maghead\DSN\DSN
     */
    private $dsn;


    /**
     * @var SQLBuilder\Driver\BaseDriver
     */
    private $queryDriver;

    public function prepareAndExecute($sql, array $args = array())
    {
        $stm = $this->prepare($sql);
        $stm->execute($args); // $success
        return $stm;
    }

    public function getQueryDriver()
    {
        if ($this->queryDriver) {
            return $this->queryDriver;
        }
        return $this->queryDriver = PDODriverFactory::create($this);
    }

    /**
     * @return Maghead\DSN object
     */
    public function getDSN()
    {
        if ($this->dsn) {
            return $this->dsn;
        }
        return $this->dsn = DSNParser::parse($this->config['dsn']);
    }

    public function __clone()
    {
        $this->dsn = clone $this->dsn;
    }

    public function raw($val)<commit_msg>Remove getDSN from Connection class<commit_after><?php

namespace Maghead\Runtime;

use Maghead\DSN\DSNParser;
use Maghead\DSN\DSN;
use Maghead\Runtime\Connector\PDOMySQLConnector;
use SQLBuilder\Driver\PDODriverFactory;
use SQLBuilder\Raw;

use PDO;

class Connection extends PDO
{
    /**
     * @var array
     */
    public $config;

    /**
     * @var string
     */
    protected $user;

    /**
     * @var string
     */
    protected $pass;

    /**
     * @var Maghead\DSN\DSN
     */
    private $dsn;


    /**
     * @var SQLBuilder\Driver\BaseDriver
     */
    private $queryDriver;

    public function prepareAndExecute($sql, array $args = array())
    {
        $stm = $this->prepare($sql);
        $stm->execute($args); // $success
        return $stm;
    }

    public function getQueryDriver()
    {
        if ($this->queryDriver) {
            return $this->queryDriver;
        }
        return $this->queryDriver = PDODriverFactory::create($this);
    }

    public function __clone()
    {
        $this->dsn = clone $this->dsn;
    }

    public function raw($val)
{'fraction_non_alphanumeric': 0.13676286072772897, 'fraction_numerical': 0.0, 'mean_word_length': 2.0588235294117645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4595634', 'n_tokens_mistral': 781, 'n_tokens_neox': 766, 'n_words': 156}