private function bindStatementParameters(DriverStatementInterface $statement, array $parameters, array $types)
    {
        foreach ($parameters as $key => $parameter) {
            if (is_int($key)) {
                $placeholder = $key + 1;
            } else {
                $placeholder = ':'.$key;
            }

            if (isset($types[$key])) {
                list($parameter, $type) = TypeUtility::convertToDatabase(
                    $parameter,
                    $types[$key],
                    $this->getPlatform()
                );

                $statement->bindValue($placeholder, $parameter, $type);
            } else {
                $statement->bindValue($placeholder, $parameter);
            }
        }
    }