public function get_queries() {
        $queries = $this->getProfiler()->getProfiles();

        if ($this->get_emulate_state()) {
            // keep queries if $query['function'] != 'prepare'
            $queries = array_filter($queries, function($query) {return $query['function'] !== 'prepare';});
        }

        return $queries;
    }