protected function bindParameters(Statement $statement, array $parameters): Statement
    {
        foreach ($parameters as $index => $parameter) {
            if (is_numeric($index)) {
                if ($parameter->getType() == PDO::PARAM_LOB) {
                    $value = $parameter->getValue();
                    $statement->bindParam(
                        $index + 1,
                        $value,
                        $parameter->getType(),
                        0,
                        PDO::SQLSRV_ENCODING_BINARY
                    );
                    continue;
                }

                //Numeric, @see http://php.net/manual/en/pdostatement.bindparam.php
                $statement->bindValue($index + 1, $parameter->getValue(), $parameter->getType());
            } else {
                //Named
                $statement->bindValue($index, $parameter->getValue(), $parameter->getType());
            }
        }

        return $statement;
    }