public function getQuery(AnConfig $config = null)
    {
        if (!isset($config)) {
            $config = new AnConfig(array('adapter' => $this));
        }

        return new AnDatabaseQuery($config);
    }